Android 布局测试
2024-09-15 14:03:23
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="测试与左边距离" />
paddingLeft
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="40sp"
android:text="测试空间内左边距" />
padding
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20sp"
android:paddingBottom="20sp"
android:paddingLeft="40sp"
android:paddingRight="40sp"
android:text="测试空间内边距" />
gravity
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="测试文字居中" />
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:text="测试文字居左" />
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="测试文字居右" />
最新文章
- iOS-----App闪退,程序崩溃---解决方案
- WindowsForm如何实现类似微软project软件的甘特图?
- iOS开发 multipart 上传多张图片
- servlet设置缓存时间以及文件的下载
- CSS3之边框样式(动画过渡)
- 连续调用inet_ntoa打印出错的问题
- Android:布局实例之常见用户设置界面
- ACdream 1017 Fast Transportation
- .Net Web开发中实现剪切板功能
- xcode6 iOS sdk8.1隐藏系统状态栏
- JAVA中extends&#160;与implements的用法
- CORS跨域资源共享你该知道的事儿
- 004-谈一谈lock和synchronized
- 安装oracle时修改Linux版本问题
- centos/redhat/ubuntu不同之处
- 修改docker容器的端口映射
- SAP接口的调用
- DevExpress 使用条形码二维码控件打印
- 利用HBuilder打包前端开发webapp为apk
- 2018.07.10NOIP模拟 Draw(容斥原理)