*gravity的取值详表
android有 android:layout_gravity 和 android:gravity,前者设置相对父控件布局,后者是设置自己内部的控件的布局。
Value | Description |
top | Put the object at the top of its container, not changing its size. 将对象放在其容器的顶部,不改变其大小. |
bottom | Put the object at the bottom of its container, not changing its size. 将对象放在其容器的底部,不改变其大小. |
left | Put the object at the left edge of its container, not changing its size. 将对象放在其容器的左侧,不改变其大小. |
right | Put the object at the right edge of its container, not changing its size. 将对象放在其容器的右侧,不改变其大小. |
center_vertical | Place object in the vertical center of its container, not changing its size. 将对象纵向居中,不改变其大小. 垂直对齐方式:垂直方向上居中对齐。 |
fill_vertical | Grow the vertical size of the object if needed so it completely fills its container. 必要的时候增加对象的纵向大小,以完全充满其容器. 垂直方向填充 |
center_horizontal | Place object in the horizontal center of its container, not changing its size. 将对象横向居中,不改变其大小. 水平对齐方式:水平方向上居中对齐 |
fill_horizontal | Grow the horizontal size of the object if needed so it completely fills its container. 必要的时候增加对象的横向大小,以完全充满其容器. 水平方向填充 |
center | Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. 将对象横纵居中,不改变其大小. |
fill | Grow the horizontal and vertical size of the object if needed so it completely fills its container. This is the default. 必要的时候增加对象的横纵向大小,以完全充满其容器. |
clip_vertical | Additional option that can be set to have the top and/or bottom edges of the child clipped to its container's bounds. The clip is based on the vertical gravity: a top gravity clips the bottom edge, a bottom gravity clips the top edge, and neither clips both edges.
附加选项,用于按照容器的边来剪切对象的顶部和/或底部的内容. 剪切基于其纵向对齐设置:顶部对齐时,剪切底部;底部对齐时剪切顶部;除此之外剪切顶部和底部. 垂直方向裁剪 |
clip_horizontal | Additional option that can be set to have the left and/or right edges of the child clipped to its container's bounds. The clip is based on the horizontal gravity: a left gravity clips the right edge, a right gravity clips the left edge, and neither clips both edges.
附加选项,用于按照容器的边来剪切对象的左侧和/或右侧的内容. 剪切基于其横向对齐设置:左侧对齐时,剪切右侧;右侧对齐时剪切左侧;除此之外剪切左侧和右侧. 水平方向裁剪 |
*gravity的取值详表的更多相关文章
- Jquery Post提交时Content-Type的不同取值详解
四种常见的 POST 提交数据方式 我们知道,HTTP 协议是以 ASCII 码传输,建立在 TCP/IP 协议之上的应用层规范.规范把 HTTP 请求分为三个部分:状态行.请求头.消息主体.类似于下 ...
- jQuery操作CheckBox的方法(选中,取消,取值)详解
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD ...
- lr参数化取值与连接数据库
TXT文本,EXCEL表格以及数据库中的表都可以作为参数的数据集载体,LR都是支持的. 特别提醒: 1.在形成数据池之后,数据库中的数据变化不会影响数据池中的数据. 2.数据文件一定要以一个空行结束, ...
- JSON取值(key是中文或者数字)方式详解
JSON取值(key是中文或者数字)方式详解 先准备一个json对象用于演示 var json = {'name':'zhangsan', '年龄':23, 404:'你可能迷路了'}; 使用JS中w ...
- jQuery对html元素的取值与赋值实例详解
jQuery对html元素的取值与赋值实例详解 转载 2015-12-18 作者:欢欢 我要评论 这篇文章主要介绍了jQuery对html元素的取值与赋值,较为详细的分析了jQuery针对常 ...
- spring+hibernate实体类注解详解(非原创) + cascade属性取值
@Entity //继承策略.另一个类继承本类,那么本类里的属性应用到另一个类中 @Inheritance(strategy = InheritanceType.JOINED ) @Table(nam ...
- react表单事件和取值
常见的表单包括输入框,单选框,复选框,下拉框和多文本框,本次主要总结它们在react中如何取值. 输入框 在之前有说过输入框,可以先给input框的value绑定一个值,然后通过input框的改变事件 ...
- mysql数据库TINYINT取值范围详解
分享下mysql中TINYINT的取值范围,很基础的一些内容. 在MySQL的数据类型中,Tinyint的取值范围是:带符号的范围是-128到127.无符号的范围是0到255(见官方<MySQL ...
- 取值:form表单取值、input框绑定取值
1. form表单取值1.1 方式一,通过<form bindsubmit="formSubmit">与<button formType="submit ...
随机推荐
- wall time和monotonic time[转载]
在一些系统调用中需要指定时间是用CLOCK_MONOTONIC还是CLOCK_REALTIME,以前总是搞不太清楚它们之间的差别,现在终于有所理解了. CLOCK_MONOTONIC是mono ...
- Mac下使用Web服务器性能/压力测试工具webbench、ab、siege
Web开发,少不了的就是压力测试,它是评估一个产品是否合格上线的基本标准,下面我们来一一剖析他们的使用方式. 测试前,前面先把系统的端口限制数改大,看看Mac下面的默认限制 ulimit -a ope ...
- [转]JAVA布局模式:GridBagConstraints终极技巧
最近正在 修改<公交线路查询系统>,做系统的时候都是用NULL布局,由于NULL布局调用windows系统的API,所以生成的程序无法在其他平台上应用,而 且如果控件的数量很多,管理起来也 ...
- 自学JAVA总结
2.在定义常量的时候C语言中定义为const而JAVA中为final3.在JAVA声明成员变量的时候,使用static来定义.4.在JAVA中的boolean类型只包括true和false,但是在C中 ...
- hadoop可能遇到的问题
1.hadoop运行的原理? 2.mapreduce的原理? 3.HDFS存储的机制? 4.举一个简单的例子说明mapreduce是怎么来运行的 ? 5.面试的人给你出一些问题,让你用mapreduc ...
- EXTJS 资料 Ext.Ajax.request 获取返回数据
下面是一个登陆页面调用的EXTJS login function,通过 url: '/UI/HttpHandlerData/Login/Login.ashx',获取返回登陆账户和密码! Ext.onR ...
- Unity3d中所有特殊的文件夹
1.Editor Editor文件夹可以在根目录下,也可以在子目录里,只要名子叫Editor就可以.比如目录:/xxx/xxx/Editor 和 /Editor 是一样的,无论多少个叫Editor的 ...
- 【BZOJ 2878】 [Noi2012]迷失游乐园
Description 放假了,小Z觉得呆在家里特别无聊,于是决定一个人去游乐园玩.进入游乐园后,小Z看了看游乐园的地图,发现可以将游乐园抽象成有n个景点.m条道路的无向连通图,且该图中至多有一个环( ...
- SC命令执行出现Access is denied
在命令行中先是打开远程链接:net use \\computername(or ip)\ipc$ "password" /user:"[domain\]username& ...
- android/IOS各平台分享链接/跳转链接配置说明(备用)
Android: [Java] 纯文本查看 复制代码 ? 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 微信/朋友圈 //设置 ...