当前位置:首页 > 移动开发 > 正文

Android 布局测试

2024-03-31 移动开发

wrap_content

<Button
    android:id="@ id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="测试填满父控件的空白" />

 

 

 layout_marginTop

<Button
    android:id="@ id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="20dp"
    android:text="测试与上边的距离" />

 

layout_marginLeft

<Button
    android:id="@ id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="50dp"
    android:text="测试与左边距离" />

 

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/yidong/25547.html