【发布时间】:2020-01-05 01:34:16
【问题描述】:
根据我的 android UI 中的材料设计指南,我似乎无法摆脱 Exposed Dropdown Menu 的黑色下划线。
下拉列表如下所示:
我尝试将背景设置为空、透明或自定义形状。 app:boxBackgroundMode="none" 也不起作用。
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/spinner_age"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_rounded_button"
android:hint="Age">
<AutoCompleteTextView
android:id="@+id/age_dropdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"/>
</com.google.android.material.textfield.TextInputLayout>
理想情况下,下拉菜单看起来像一个没有下划线的按钮。我该如何摆脱它?
【问题讨论】:
-
请分享您的文件代码:@drawable/bg_rounded_button
标签: android kotlin material-design android-textinputlayout material-components-android