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的取值详表的更多相关文章

  1. Jquery Post提交时Content-Type的不同取值详解

    四种常见的 POST 提交数据方式 我们知道,HTTP 协议是以 ASCII 码传输,建立在 TCP/IP 协议之上的应用层规范.规范把 HTTP 请求分为三个部分:状态行.请求头.消息主体.类似于下 ...

  2. jQuery操作CheckBox的方法(选中,取消,取值)详解

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD ...

  3. lr参数化取值与连接数据库

    TXT文本,EXCEL表格以及数据库中的表都可以作为参数的数据集载体,LR都是支持的. 特别提醒: 1.在形成数据池之后,数据库中的数据变化不会影响数据池中的数据. 2.数据文件一定要以一个空行结束, ...

  4. JSON取值(key是中文或者数字)方式详解

    JSON取值(key是中文或者数字)方式详解 先准备一个json对象用于演示 var json = {'name':'zhangsan', '年龄':23, 404:'你可能迷路了'}; 使用JS中w ...

  5. jQuery对html元素的取值与赋值实例详解

    jQuery对html元素的取值与赋值实例详解 转载  2015-12-18   作者:欢欢   我要评论 这篇文章主要介绍了jQuery对html元素的取值与赋值,较为详细的分析了jQuery针对常 ...

  6. spring+hibernate实体类注解详解(非原创) + cascade属性取值

    @Entity //继承策略.另一个类继承本类,那么本类里的属性应用到另一个类中 @Inheritance(strategy = InheritanceType.JOINED ) @Table(nam ...

  7. react表单事件和取值

    常见的表单包括输入框,单选框,复选框,下拉框和多文本框,本次主要总结它们在react中如何取值. 输入框 在之前有说过输入框,可以先给input框的value绑定一个值,然后通过input框的改变事件 ...

  8. mysql数据库TINYINT取值范围详解

    分享下mysql中TINYINT的取值范围,很基础的一些内容. 在MySQL的数据类型中,Tinyint的取值范围是:带符号的范围是-128到127.无符号的范围是0到255(见官方<MySQL ...

  9. 取值:form表单取值、input框绑定取值

    1. form表单取值1.1 方式一,通过<form bindsubmit="formSubmit">与<button formType="submit ...

随机推荐

  1. C#委托的异步调用1

    本文将主要通过“同步调用”.“异步调用”.“异步回调”三个示例来讲解在用委托执行同一个“加法类”的时候的的区别和利弊. 首先,通过代码定义一个委托和下面三个示例将要调用的方法: /*添加的命名空间 u ...

  2. ubuntu12.04 server + apache2 + wsgi + django1.6 部署

    最近在学Python和Django,想自己部署一个服务器试试 环境:ubuntu12.04 server | apache2 | django1.6 | python2.7 | mod_wsgi 在网 ...

  3. 给UITextField左侧加一个小图标

    xcode 6.1 File-New-Project.. iOs-Application-Simple View Application 1.写一个自定义JSTextField类,继承UITextFi ...

  4. eclipse里maven项目An error occurred while filtering resources解决办法(转载)

    转自:http://liyanjie918.blog.163.com/blog/static/20227290201581143110105/ 在使用eclipse构建maven项目时,突然出现错误提 ...

  5. jQuery 点击按钮刷新页面

    //页面加载时绑定按钮点击事件 $(function () { $("#按钮id").click(function () { refresh(); }); }); //点击按钮调用 ...

  6. To get TaskID's Integer ID value from the GUID in SharePoint workflow

    list.GetItemByUniqueId(guid).ID int itemID = spList.Items[new Guid("")].ID;

  7. mybatis的javaType和ofType

    都是指定对象的类型 不同的是当使用反向查询select从另一个maper文件中取出数据时必须用ofType 都可以为collection和association是指定对象的类型, 都不是必须写的, 只 ...

  8. [转]LINQ操作数据库

    查询表达式(LINQ)简介 C#3.0新语特性和改进,这些新特性在我们编写程序时为我们提供了非常大的帮助.从这篇开始,我们开始一起来探讨LINQ. LINQ是Language Integrated Q ...

  9. select框宽度与高度设置(实用版)

    在IE中只能使用 font-size: 限制 select 的高度.   同时使用 width:200px 限制宽度   size="20" 表示最多显示20个选项,超过20的需要 ...

  10. 如何使用PHP实现一个WebService

    WSDL WSDL(网络服务描述语言,Web Services Description Language)是一门基于 XML 的语言,用于描述 Web Services 以及如何对它们进行访问.这种文 ...