问题描述
我的项目中有一个AutoCompleteTextView。它正在工作,但是下拉列表显示在文本视图的顶部而不是底部。我将dropDownAnchor设置为文本视图,但是它什么也没做。我不知道该如何解决。任何帮助将不胜感激。
<AutoCompleteTextView
android:id="@+id/tagsTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:backgroundTint="@color/darkGray"
android:completionThreshold="2"
android:dropDownAnchor="@+id/tagsTextView"
android:hint="Enter Tag"
android:textCursorDrawable="@drawable/autocomplete_cursor_color"
app:layout_constraintEnd_toStartOf="@id/addButton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tagsLayout">
外观如下: