我有一个带有右侧drawable [v]的Edittext,使其看起来像一个下拉菜单。现在,我该如何实现它呢?我需要将edittext设置为可点击,然后当我点击它时,会弹出一个对话框片段,其中包含一个列表(看起来像是下拉菜单选项)。
是否可能实现这个功能?
是否可能实现这个功能?
<android.support.design.widget.TextInputLayout
android:id="@+id/tilAppCategory"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edtAppCategory"
android:hint="Category"
android:fontFamily="sans-serif-light"
android:textColorHint="@color/textColorHint"
android:maxLines="1"
android:gravity="center|start"
android:inputType="textNoSuggestions"
android:textColor="@color/colorPrimaryDark"
android:textSize="14sp"
android:drawableEnd="@drawable/icon_spinner_down"
android:focusableInTouchMode="true"
android:clickable="true"
/>
</android.support.design.widget.TextInputLayout>