【发布时间】:2019-12-05 03:58:08
【问题描述】:
我遇到的问题是,当我想在设计库的“com.google.android.material:material:1.1.0-alpha02”之后的版本上设置 TextInputLayout 上的 boxBackgroundColor 时,我没有看到任何更改,因为我想要要使用仅在更高版本中支持的 ExposedDropdownMenu,我似乎找不到任何解决方案。 我尝试在 java 和样式中设置它,但没有结果。
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/Theme.MaterialComponents"
app:boxBackgroundColor="@color/colorAccent"
android:hint="@string/hint_text">
<AutoCompleteTextView
android:id="@+id/filled_exposed_dropdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
【问题讨论】:
标签: android material-design android-textinputlayout material-components material-components-android