【发布时间】:2017-06-18 04:57:37
【问题描述】:
例如:我为 Button 编写的以下代码:
<Button
android:id="@+id/button_submit"
android:layout_width="match_parent"
android:layout_height="58dp"
android:layout_marginBottom="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:theme="@style/AppTheme.Button"
android:text="Done"
android:textSize="20sp" />
并且应用于Button的主题代码是
<style name="AppTheme.Button" parent="Widget.AppCompat.Button.Colored">
<item name="android:textAllCaps">false</item>
<item name="colorButtonNormal">@color/appTurquoiseColor</item>
<item name="android:textColor">@android:color/white</item>
</style>
问题出在我的具有 android 6.0 的设备(Coolpad Note3 Lite)上,按钮没有获得我在主题中应用的 TurquoiseColor 背景。虽然它在其他设备上运行良好。如何解决此问题。
【问题讨论】:
标签: android xml user-interface layout android-6.0-marshmallow