Reputation: 506
I am trying to make an XML
file for Android remote control. I have used TableLayout
As you see from the screenshot the column changes its size (but all images have the same size). The problem is only with that row.
Here is the link to my code (can not put it here as my XML
is too big):
https://codeshare.io/G6qDnk
Upvotes: 3
Views: 66
Reputation: 1382
<TableRow
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center">
<LinearLayout android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical">
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0.5"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_gravity="center"
app:srcCompat="@mipmap/right" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0.5"/>
</LinearLayout>
</TableRow>
try this code of table row for the left button and right button around Ok button.
Upvotes: 1