In my app i created an activity i have place a 5 continuous edit boxes inside a table layout, in the same activity i have 3 image buttons and an image view. The UI looks good in an 320x480 device but when i tried it in a 480x854 device its not fine. I am able to arrange the image buttons and image views by giving width, height, x and y axis respectively in the coding but when i tried to do the same with table layout my app gets crashed.
How to re-size the table layout to be fit. Following is my xml file of the table layout:
<TableLayout
android:id="@+id/widget01"
android:layout_width="280px"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_x="34px"
android:layout_y="60px"
>
<TableRow
android:id="@+id/widget11"
android:layout_width="280px"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<EditText
android:id="@+id/widget111"
android:layout_width="242px"
android:layout_height="wrap_content"
android:textSize="18sp"
>
</EditText>
</TableRow>
</TableLayout>
<TableLayout
android:id="@+id/widget02"
android:layout_width="280px"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_x="34px"
android:layout_y="98px"
>
<TableRow
android:id="@+id/widget12"
android:layout_width="280px"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<EditText
android:id="@+id/widget222"
android:layout_width="242px"
android:layout_height="wrap_content"
android:textSize="18sp"
>
</EditText>
</TableRow>
</TableLayout>
If you want to avoid complications with
different Screensizes, usedipinstead ofpx