I have following layout in my android application.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainlayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bbg">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="0">
<TableRow>
<EditText
android:id="@+id/TestEdit"
android:hint="Test"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<Button
android:id="@+id/TestButtin"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text = "Test"/>
</TableRow>
</TableLayout>
</LinearLayout>
<com.google.android.maps.MapView
android:id="@+id/MapView" android:clickable="true"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:apiKey="KEY" />
</LinearLayout>
The problem is, that when I change text in EditText using setText() method, if text is too long EditText scratches and pushes Button out of screen. I don’t want EditText to scrath, but I want it to be also I want it to be “fill_parent” by default/
How can I fix it? Thanks.
I hope this helps: