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. DTCMS视频模版更改,

    1.去掉style.css中视频的高度 .video-box{ position:relative; width:100%; height:473px; _clear:both; _display:i ...

  2. python学习之socket创建html服务器

    #coding:utf-8 import socket def process_request(request): request.recv(1024)#读取接受的字节 request.send(&q ...

  3. ThinkPHP图片上传

    ThinkPHP是国内比较流行的轻量级的PHP框架,它在国内流行的一个最主要的因素在于它的说明文档非常健全完善,以及它源码内的注释都是中文的,方便于英语能力较差的程序员学习. 图片上传在网站里是很常用 ...

  4. Vb.Net Xml文档格式化

    最近在处理Webservice文档的时候,因为是未格式化的,需要处理,所以有了以下代码. #Region "Xml字符串转换成格式化的XML文件" 'txt_Result.Text ...

  5. Python的文件与文件夹操作

    Python的文件与文件夹操作 Python OS模块 1.重命名:os.rename(old, new) 2.删除:os.remove(file) 3.列出目录下的文件 :os.listdir(pa ...

  6. Beaglebone Back学习五(PWM测试)

    PWM测试 参考链接 1 Enable PWM on BeagleBone with Device Tree overlays 2Using PWM on the Beaglebone Black 3 ...

  7. ZOJ 1074 最大子矩阵和

    Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any ...

  8. Eclipse 中隐藏的 5 个非常有用的功能

    Eclipse就是一头野兽.它也是一套设备,神秘但更具威力.有些人称它为一个持续变形机.另一些人则称它是一个变异体.不错,它很庞大,需要花费多年才能掌握.而在你好不容易掌握之后,你的老板出现了然后告诉 ...

  9. 使用自定义任务审批字段创建 SharePoint 顺序工作流

    http://msdn.microsoft.com/zh-cn/library/hh824675(v=office.14).aspx#odc_sp14_ta_CreatingSPSeqWorkflow ...

  10. 内存泄露 memory leak 的原因

    #include <iostream> using namespace std; void foo() { MyClass *x; x = new MyClass(); //指向的丢失了 ...