0

edittextとlistviewを使用して、Androidで検索候補を作成しました。

私が正確に必要としているのは、編集テキストの後に非常に多くのボタンがある私のアクティビティです。編集テキストに文字を入力すると、対応する検索がリストビューに表示されますが、ボタンはそのリストビューの後に表示されます。

私のxmlファイルは次のようになります..

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
 <!-- Editext for Search -->
<EditText android:id="@+id/inputSearch"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:hint="Search products.."
    android:inputType="textVisiblePassword"/>

<!-- List View -->
<ListView
    android:id="@+id/list_view"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />

    <Button android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="after Edit Text"/>

    <Button android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Second Button"/>
</LinearLayout>

私は次のように出力されています

ここに画像の説明を入力

私が必要としているのは、その検索可能な編集テキストの後にバックグラウンドでボタンを邪魔しないようにするための提案のリストです。

4

1 に答える 1