検索ボックスの横にボタンを表示するときに問題があります。私は自動完全なテキストビューを使用していますが、これは自動完全なテキストビューのためかどうかわかりません。どのように私はこれを修正することができます。この問題を解決するには検索ボックスの隣にあるボタンを見ることができません。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<AutoCompleteTextView
android:id="@+id/autocomplete"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="text"
/>
<Button
android:id="@+id/search_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Go"
/>
</LinearLayout>
アンドロイド:layout_weight = 1は、他のビューとスペースを共有するために "寛大な"ビューを作成するために使用されますか? – madcoderz
はい。重み値は0から1までの任意の値で指定でき、デフォルト値(明示的に設定しない場合に得られる値)は0です。2つのViewsに等しい重みを与えると、それらの間で均等に空間を共有しようとします。 – Jems
これは、社会主義者の見解です。答えをありがとう、それは働いている。 – madcoderz