Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TableRow's column changes its size

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

enter image description here

like image 782
abrutsze Avatar asked Aug 16 '26 17:08

abrutsze


1 Answers

 <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.

like image 61
TysonSubba Avatar answered Aug 24 '26 04:08

TysonSubba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!