【发布时间】:2019-08-27 23:21:50
【问题描述】:
Material Spec 显示一个禁用的按钮状态,看起来是灰色的。
https://www.material.io/design/components/buttons.html#toggle-button
我正在使用来自 Android 的材料组件的 MaterialButton: https://www.material.io/develop/android/components/material-button/
但是,当将按钮设置为禁用时,按钮的颜色/色调不会改变。
<com.google.android.material.button.MaterialButton
android:id="@+id/disabled_material_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:text="@string/button_label_disabled"/>
只是默认情况下没有在 Material Android 组件中实现? Material Components 是否定义了禁用的按钮状态列表?
【问题讨论】:
标签: android android-layout colors material-design android-button