我在Android 5.0上使用AutoCompleteTextView和自定义适配器和过滤器
以下是截图:
提出建议:
没有建议:
这是片段的Xml布局,没有工具栏:
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:text="Name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<AutoCompleteTextView
android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="text"/>
<TextView
android:text="Artist name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<AutoCompleteTextView
android:id="@+id/artist_name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="text"/>
</LinearLayout>
</FrameLayout>
答案 0 :(得分:0)
使用android:fitsSystemWindow =&#34; true&#34;在您的父视图组中。