java Column_layout在安卓 tablelayout中不起作用
安卓中的表格布局错误。问题是,我想使用property column_layout in 2 tablerow将按钮移动到第二行的1列。我找到了解决办法。请核对我的答案
安卓:layout_width="match_parent"
安卓:layout_height="match_parent"
tools:context=".TableLayoutActivity"
安卓:orientation="vertical"
<TableRow>
<Button 安卓:id="@+id/firstButton"
安卓:layout_width="0dp"
安卓:layout_height="wrap_content"
安卓:layout_weight="1"
安卓:text="@string/myFirstbtn"/>
<Button 安卓:id="@+id/ThirdButton"
安卓:layout_width="0dp"
安卓:layout_height="wrap_content"
安卓:layout_weight="1"
安卓:text="@string/myThirdbtn"/>
<Button 安卓:id="@+id/FourthButton"
安卓:layout_width="0dp"
安卓:layout_height="wrap_content"
安卓:layout_weight="1"
安卓:text="@string/myFourthbtn"/>
</TableRow>
<TableRow>
<Button 安卓:id="@+id/secButton"
安卓:layout_column="1"
安卓:text="@string/mySecbtn"/>
</TableRow>
共 (0) 个答案