【发布时间】:2016-06-19 01:08:59
【问题描述】:
我用这个样式来改变我Button的背景颜色:
<style name="AccentButton" parent="Widget.AppCompat.Button.Colored">
<item name="colorButtonNormal">@color/colorAccent</item>
<item name="android:textColor">@color/white</item>
</style>
在布局中:
<Button
android:id="@+id/login_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_login_login_button"
app:theme="@style/AccentButton"/>
它有效。但是当我在这个Button 上调用setEnabled(false) 时,它保持相同的颜色。我该如何处理这种情况?
【问题讨论】:
标签: android android-appcompat android-button