【风马一族_Android】代码英语之二 布局文件的Android各个参数

布局文件的Android各个参数

 第一类:属性值 true或者 false
           android:layout _center Hrizontal       水平居中
      android:layout _center Vertical        垂直居中
      android:layout _center Inparent         相对于父元素完全居中
      ===========================================================================

    android:layout _align Parent Bottom        贴紧父元素的下边缘
      android:layout _align Parent Left         贴紧父元素的左边缘
      android:layout _align Parent Right         贴紧父元素的右边缘
      android:layout _align Parent Top         贴紧父元素的上边缘
      ===========================================================================

    android:layout _ align With    Parent If Missing     如果对应的兄弟元素找不到的话就以父元素做参照物
         

    android:layout _ align Parent  Start 紧贴父元素结束位置开始

           android:layout_ align Parent   End 紧贴父元素结束位置结束

   ===========================================================================

           android:animate    Layout Changes  布局改变时是否有动画效果

           android:animation  Cache       定义子布局也有动画效果

   

    android:clip Children    定义子布局是否一定要在限定的区域内

           android:clip To Padding    定义布局间是否有间距

           ===========================================================================

           android:always    Drawn  With     Cache    定义子布局是否应用绘图的高速缓存

           android:add        States   From    Children   定义布局是否应用子布局的背景

    android:duplicate Parent  State        是否从父容器中获取绘图状态(光标,按下等)

    ===========================================================================

           android:split   Motion  Events         定义布局是否传递touch事件到子布局

           android:focusable In     Touch   Mode            定义是否可以通过touch获取到焦点

     ===========================================================================

           android:is    Scroll  Container      定义布局是否作为一个滚动容器 可以调整整个窗体

           android:fade    Scrollbars             滚动条自动隐藏

    android:requires Fading   Edge        定义滚动时边缘是否褪色

    ===========================================================================

           android:fits System   Windows        设置布局调整时是否考虑系统窗口(如状态栏)

    android:save Enabled            设置是否在窗口冻结时(如旋转屏幕)保存View的数据

    android:filter Touches    When   Obscured 所在窗口被其它可见窗口遮住时,是否过滤触摸事件

           android:visibility             定义布局是否可见          

    ===========================================================================

          

    android:clickable            定义是否可点击

           android:long  Clickable         定义是否可长点击

       android:keep   Screen     On       设置屏幕常亮

           android:sound  Effects     Enabled  点击或触摸是否有声音效果

           android:haptic  Feedback   Enabled  设置触感反馈

    ===========================================================================

       

  第二类:属性值必须为id的引用名@id/id-name

         android:layout_align  Baseline 本元素的文本与父元素文本对齐

    android:layout_ below        在某元素的下方
    android:layout_ above        在某元素的上方
    android:layout_ to Left Of     在某元素的左边
    android:layout_ to Right Of     在某元素的右边

   ===========================================================================

        

    android:layout_ to   Start  Of  本元素从某个元素开始

         android:layout_ to  End  Of  本元素在某个元素结束

=  ==========================================================================

   

    android:layout_ align Top       本元素的上边缘和某元素的的上边缘对齐
    android:layout_ align Left       本元素的左边缘和某元素的的左边缘对齐
    android:layout_ align Bottom       本元素的下边缘和某元素的的下边缘对齐
    android:layout_ align Right     本元素的右边缘和某元素的的右边缘对齐

   ===========================================================================

        

    android:layout_ align Start    本元素与开始的父元素对齐

        android:layout_ align End     本元素与结束的父元素对齐

    ===========================================================================

        

     android:ignore    Gravity     指定元素不受重力的影响

         android:layout  Animation     定义布局显示时候的动画

         android:id              为布局添加ID方便查找

         android:tag            为布局添加tag方便查找与类似

     ===========================================================================

         android:scrollbar  Thumb  Horizontal  设置水平滚动条的

         android:scrollbar  Thumb  Vertical      设置垂直滚动条的

         android:scrollbar  Track    Horizontal  设置水平滚动条背景(轨迹)的色

         android:scrollbar  Track    Vertical      设置垂直滚动条背景(轨迹)的色

   ===========================================================================

         android:scrollbar  Always  Draw  Horizontal  Track 设置水平滚动条是否含有轨道

         android:scrollbar  Always  Draw  Vertical      Track 设置垂直滚动条是否含有轨道

         ===========================================================================

         android:next  Focus  Left    设置左边指定视图获得下一个焦点

         android:next  Focus  Right  设置右边指定视图获得下一个焦点

         android:next  Focus  Up      设置上边指定视图获得下一个焦点

         android:next  Focus  Down  设置下边指定视图获得下一个焦点

         android:next  Focus  Forward 设置指定视图获得下一个焦点

     ===========================================================================

         android:content Description      提示信息

         android:OnClick          点击时从上下文中调用指定的方法

   ===========================================================================

        

     第三类:属性值为具体的像素值,如30dip40px,50dp

      

  android:layout_width定义本元素的宽度

       android:layout_height定义本元素的高度

  ===========================================================================

       android:layout_ margin       本元素离上下左右间的距离

   android:layout_ margin Bottom    离某元素底边缘的距离
   android:layout_ margin Left     离某元素左边缘的距离
   android:layout_ margin Right     离某元素右边缘的距离
   android:layout_ margin Top     离某元素上边缘的距离

        android:layout_ margin Start     本元素里开始的位置的距离

        android:layout_ margin End    本元素里结束位置的距离

   ===========================================================================

        android:scrollX水平初始滚动偏移

        android:scrollY垂直初始滚动偏移

    ===========================================================================

        android:background  本元素的背景

    ===========================================================================

        android:padding        指定布局与子布局的间距

        android:padding  Left       指定布局左边与子布局的间距

        android:padding  Top       指定布局上边与子布局的间距

        android:padding  Right     指定布局右边与子布局的间距

        android:padding  Bottom  指定布局下边与子布局的间距

  

        android:padding  Start    指定布局左边与子布局的间距   与android:paddingLeft相同

        android:padding  End     指定布局右边与子布局的间距   与android:paddingRight相同

   ===========================================================================

        android:fading  EdgeLength 设置边框渐变的长度

   ===========================================================================

        android:min  Height    最小高度

        android:min  Width     最小宽度

   ===========================================================================

        android:translation X   水平方向的移动距离

        android:translation Y   垂直方向的移动距离

 

        android:transform  Pivot  X    相对于一点的水平方向偏转量

        android:transform  Pivot  Y    相对于一点的垂直方向偏转量

   ===========================================================================

        第四类:属性值问Android内置值的

 

    android:alpha              设置透明度

    android:fits      System    Windows  设置布局调整时是否考虑系统窗口(如状态栏)

        android:gravity                 控件布局方式

        android:layout_   gravity        布局方式

    android:layout       Direction       定义布局图纸的方向

        android:persistent    Drawing   Cachehua  定义绘图的高速缓存的持久性  

        android:descendant  Focusability       控制子布局焦点获取方式 常用于listView的item中包含多个控件 点击无效

   ===========================================================================

        android:scrollbars               设置滚动条的状态

        android:scrollbar  Style            设置滚动条的样式

        android:scrollbar  Fade  Duration       设置滚动条淡入淡出时间

        android:scrollbar  Default DelayBeforeFade    设置滚动条N毫秒后开始淡化,以毫秒为单位。

        android:scrollbar  Size              设置滚动调大小

   

    android:vertical    Scrollbar Position        摄者垂直滚动条的位置

    android:fading      Edge             设置拉滚动条时 ,边框渐变的放向

        ===========================================================================

    android:drawing   Cache  Quality  设置绘图时半透明质量

        android:Over   Scroll   Mode    滑动到边界时样式

        ===========================================================================

        android:rotation    旋转度数

        android:rotation  X    水平旋转度数

        android:rotation  Y    垂直旋转度数

   ===========================================================================

        android:scale      X   设置X轴缩放

        android:scale      Y   设置Y轴缩放

   ===========================================================================

       

        android:layer Type    设定支持

       

    ===========================================================================

        android:text  Direction  定义文字方向

        android:text  Alignment  文字对齐方式

    ===========================================================================

        android:important  For  Accessibility  设置可达性的重要行

        android:label         For                     添加标签

 

每天完成一件事。 不管是为了什么。
原文地址:https://www.cnblogs.com/sows/p/5015680.html