layout_marginRight 的用法
来源:互联网 发布:java破解网站验证码 编辑:程序博客网 时间:2024/06/06 01:56
转载:http://www.cnblogs.com/newlist/p/3255348.html
<?xml version = "1.0" encoding = "utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_height="fill_parent"
android:layout_width="fill_parent"
>
<Button
android:id="@+id/button_test"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginLeft="40dp"
android:layout_marginRight="60dp"
android:layout_marginBottom="100dp"
android:text="我是第1个控件"
android:textSize="12sp" />
<Button
android:id="@+id/button_test1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="15sp"
android:layout_below="@+id/button_test"
android:paddingLeft="20sp"
android:layout_gravity="right"
android:text="我是第2个控件"
android:textSize="12sp" />
<ListView
android:id="@+id/list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button_test1" />
</LinearLayout>
<Button
android:id="@+id/button_test"
android:layout_width="wrap_content"//大小刚刚可以包住文本
android:layout_height="wrap_content"
android:layout_marginTop="30dp"//相对上方控件的距离
android:layout_marginLeft="40dp"//相对左边控件的距离
android:layout_marginRight="60dp"//相对右边控件的距离
android:layout_marginBottom="100dp"//相对下方控件的距离
android:text="我是第1个控件"
android:textSize="12sp" />//设置文本的大小
<Button
android:id="@+id/button_test1"
android:layout_width="match_parent"//宽度跟父窗口是一样的
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:paddingTop="15sp"
android:layout_below="@+id/button_test"//使该控件一直在第一个控件的下方
android:paddingLeft="20sp"//文本相对控件左边的距离
android:gravity="right"//表示文本的对齐方式
android:text="我是第2个控件"
android:textSize="12sp" />
- layout_marginRight 的用法
- 关于LinearLayout属性android:layout_marginRight的错误
- android2.x中android:layout_marginRight不起作用的解决办法
- android2.x中android:layout_marginRight不起作用的解决办法
- android2.x中android:layout_marginRight不起作用的解决办法
- android2.x中android:layout_marginRight不起作用的解决办法
- linearlayout 设置layout_marginRight居右不能生效的解决方法
- layout_marginRight不起作用
- layout_marginRight不起作用
- android:layout_marginRight不起作用
- android:layout_marginRight 不起作用解决方法
- android:gravity="right" android:layout_marginRight="16dip"
- 完美解决安卓RelativeLayout中android:layout_marginRight不生效
- ?的用法
- ?的用法
- ---" ~ " 的用法---
- ---" ~ " 的用法---
- ~ 的用法
- MQTT协议之websocket方式发布接收消息
- 如何设置sap生产订单自动关闭
- http ajp
- 第二十二章 集成验证码——《跟我学Shiro》
- Yii2 自定义class、全局函数
- layout_marginRight 的用法
- ApachePhpMysql64位环境搭建
- 第二十三章 多项目集中权限管理及分布式会话——《跟我学Shiro》
- 第二十四章 在线会话管理——《跟我学Shiro》
- Oracle学习(8):处理数据
- 服务器被黑后的处理
- xml编码格式在tomcat下运行出错,eclipse里面直接运行没有问题
- 液体壁纸价格 湖南硅藻泥 壁纸漆价格 液体墙纸绿色环保材料 转载▼
- shrio 权限管理filterChainDefinitions过滤器配置