当前位置: 代码迷 >> 综合 >> Android TableLayout 合并单元格的方法
  详细解决方案

Android TableLayout 合并单元格的方法

热度:24   发布时间:2023-12-17 22:41:21.0

注意:android:stretchColumns="0,1,2" 否则无法合并。

                <TableLayout

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:stretchColumns="0,1,2">
                    <TableRow>
                        <TextView
                            android:id="@+id/position_text_view01"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"                                                        
                            android:layout_margin="0.4dp"
                            android:textColor="#3399FF"    
                            android:padding="2dip"  
                            android:layout_column="0"  
                            android:text="您所在位置:" />
                        <TextView
                            android:id="@+id/position_text_view"
                            android:layout_width="wrap_content"
    
  相关解决方案