Reputation: 1
This is my layout XML file:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableRow android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="One"/>
<EditText android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</TableRow>
<TableRow android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Two"/>
<EditText android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="numberSigned"/>
</TableRow>
</TableLayout>
The problem, however, is that EditText views are ridiculously small - as small as possible I reckon. Is there a way to make them as wide as possible?
Upvotes: 0
Views: 3653
Reputation: 1271
make the second column of your tablelayout stretchable:
android:stretchColumns="1"
Hope this works
Upvotes: 3
Reputation: 16653
Make their width fill_parent
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="numberSigned"/>
Upvotes: 0