【发布时间】:2021-05-29 23:28:10
【问题描述】:
I have the following exposed dropdown menu that looks like this when an option is selected:
这是我的 XML 布局中公开的下拉菜单的内容:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/drop_down_menu"
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginEnd="8dp"
android:theme="@style/Theme.MaterialComponents.Light.NoActionBar"
app:layout_constraintBottom_toBottomOf="@+id/text_view_1"
app:layout_constraintEnd_toStartOf="@+id/text_view_2"
app:layout_constraintTop_toTopOf="@+id/text_view_3">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="none" />
</com.google.android.material.textfield.TextInputLayout>
如何在所选选项的左侧添加空格?
【问题讨论】:
-
android:paddingStartonMaterialAutoCompleteTextView应该工作不是吗? -
是的,我添加了它并且它有效。谢谢!
标签: android material-components-android android-textinputlayout