对于控件的 android:layout_alignParent 属性,只有在该布局的父布局也是RelativeLayout是才有用,此属性的含义为将控件边缘与父控件的边缘对齐

android:layout_alignParentLeft="true"  --将控件的左边缘和父控件的左边缘对齐
android:layout_alignParentTop="true"  --将控件的上边缘和父控件的上边缘对齐
android:layout_alignParentRight="true"  --将控件的右边缘和父控件的右边缘对齐
android:layout_alignParentBottom="true" --将控件的底边缘和父控件的底边缘对齐

android:layout_centerInParent="true"  --将控件置于父控件的中心位置
android:layout_centerHorizontal="true"  --将控件置于水平方向的中心位置
android:layout_centerVertical="true"  --将控件置于垂直方向的中心位置

更多相关文章

  1. Android Button控件 的简单使用(button监听和onClick触发函数使用
  2. Android控件抖动效果
  3. Android瀑布流控件——AndroidStaggeredGrid
  4. 在Android当中常用的控件的详解和分析
  5. iOS和android解决键盘弹出遮挡控件的处理比较
  6. Android中ViewGroup等容器控件的使用
  7. 使用shape来定义控件的一些显示属性
  8. android listView控件用法
  9. android基础控件(4)GridView实现网格视图

随机推荐

  1. android 笔记 --- Android-图片透明度处
  2. Android中怎么去掉手机的状态栏、标题栏
  3. Android Intent Action 一览表
  4. 消除使用activityGroup时, 子Activity的
  5. Android底部导航总结
  6. Android之AsyncTask源码分析(第五篇:execut
  7. 编译android需要用到的软件包以及编译过
  8. SlidingDrawer的简单实例(抽屉效果)
  9. Android MonkeyRunner调用方法总结
  10. android webview 设置“ 正在加载,请稍候