【发布时间】:2020-08-21 16:57:13
【问题描述】:
我有一个 ExposedDropDownMenu 作为 Material.IO 推荐的 Spinner。我的问题是,View.Gone 不起作用并在视图中留下一个箭头,因此仍然占用空间。
截图
XML
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
android:layout_width="0dp"
android:layout_height="wrap_content">
<AutoCompleteTextView
android:id="@+id/calibrate_message_dropdown_menu_TWO"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="none"
tools:ignore="LabelFor" />
</com.google.android.material.textfield.TextInputLayout>
代码
calibrate_message_dropdown_menu_TWO.visibility = View.GONE
感谢您的帮助。谢谢!
【问题讨论】:
标签: android kotlin autocompletetextview material-components-android android-textinputlayout