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