Android AppCompat v22.1.1按钮式api 16+;
我正在尝试使用新的supportv7 v22.1.1来设计按钮 它在带有棒棒糖的设备上运行良好,但在旧设备上,它不再应用该主题 themes.xml文件Android AppCompat v22.1.1按钮式api 16+;,android,android-support-library,Android,Android Support Library,我正在尝试使用新的supportv7 v22.1.1来设计按钮 它在带有棒棒糖的设备上运行良好,但在旧设备上,它不再应用该主题 themes.xml文件 <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:but
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:buttonStyle">@style/Button</item>
</style>
<style name="Button" parent="Widget.AppCompat.Button">
<item name="android:textColor">@color/white</item>
<item name="android:background">#1FA561</item>
</style>
</resources>
很抱歉,appcompat-v7中未包含按钮样式支持
仍然需要解决方案检查,您也可以使用任何材质按钮样式事情是,它过去工作,然后停止,无论如何,我在所有按钮上应用主题,它很糟糕,但这是最简单的解决方案
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".LoginActivity">
<ScrollView
android:id="@+id/login_form"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/email_login_form"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/email_sign_in_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/action_sign_in"
android:textStyle="bold" />
</LinearLayout>
</ScrollView>
</LinearLayout>