信仰

猛图www.omeng.org

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
这是很常见的布局内容,讲解如下:

        android:layout_below="@id/label"/>

将当前控件放置于id为label 的控件下方。

        android:layout_alignParentRight="true"

使当前控件的右端和父控件的右端对齐。这里属性值只能为true或false,默认false。

android:layout_marginLeft="10dip"

使当前控件左边空出相应的空间。

        android:layout_toLeftOf="@id/ok"

使当前控件置于id为ok的控件的左边。

        android:layout_alignTop="@id/ok"

使当前控件与id控件的上端对齐。

至此,我们已经发现,其属性之繁多。下面简单归纳一下:
第一类:属性值为true或false
*android:layout_centerHrizontal
*android:layout_centerVertical
*android:layout_centerInparent
*android:layout_alignParentBottom
*android:layout_alignParentLeft
*android:layout_alignParentRight
*android:layout_alignParentTop
*android:layout_alignWithParentIfMissing
第二类:属性值必须为id的引用名“@id/id-name”
*android:layout_below
*android:layout_above
*android:layout_toLeftOf
*android:layout_toRightOf
*android:layout_alignTop
第三类:属性值为具体的像素值,如30dip,40px
*android:layout_marginBottom
*android:layout_marginLeft
*android:layout_marginRight
*android:layout_marginTop

 

posted on 2012-03-09 18:31  信仰123  阅读(139)  评论(0编辑  收藏  举报

猛图