繁体   English   中英

TableRow的列会更改其大小

[英]TableRow's column changes its size

我正在尝试为Android远程控制创建一个XML文件。 我用过TableLayout

正如您从屏幕截图中看到的那样,该列会更改其大小(但所有图像都具有相同的大小)。 问题只出在那一行。

这是我的代码的链接(不能把它放在这里,因为我的XML太大了): https//codeshare.io/G6qDnk

在此输入图像描述

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

尝试使用左侧按钮的表行代码和“确定”按钮周围的右键。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM