Jak zapobiec zmianie rozmiaru tekstu EditText, gdy użytkownik wpisuje?
mamEditText
i aButton
ustawić obok siebie na tej samej linii poziomej. Wygląda świetnie, z wyjątkiem sytuacji, gdy użytkownik wprowadzi dużo tekstu,EditText
jest zmieniany iButton
jest zgnieciony.
mam obydwaEditText
iButton
Ustawićlayout_width="wrap_content"
. "fill_parent"
zakłóca układ i nie chcę używać absolutnych rozmiarów, jeśli nie muszę - sposób, w jaki jest teraz, wygląda świetnie zarówno w krajobrazie, jak iw portrecie, po prostu nie chcęEditText
zmienić rozmiar.
Mój układ:
<TableLayout
android:id="@+id/homelayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableRow>
<TextView
android:id="@+id/labelartist"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Find artists:" />
</TableRow>
<TableRow>
<EditText
android:id="@+id/entryartist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="6"
android:background="@android:drawable/editbox_background"
android:editable="true"
android:padding="5px"
android:singleLine="true" />
<Button
android:id="@+id/okartist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="10dip"
android:layout_weight="1"
android:text="Search" />
</TableRow>
</TableLayout>