对于控件的 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 高级控件(二)
  2. [置顶] android 自定义控件
  3. 关于基本控件TextView属性大全详解
  4. Android Button控件 的简单使用(button监听和onClick触发函数使用
  5. Android控件抖动效果
  6. Android瀑布流控件——AndroidStaggeredGrid
  7. 在Android当中常用的控件的详解和分析
  8. iOS和android解决键盘弹出遮挡控件的处理比较

随机推荐

  1. android 异常错误积累
  2. Problems of Android NDK
  3. Android APP 自定义水印(kotlin)
  4. Android 删除aar包中的jar包解决Duplicat
  5. Android下Multiple markers at this line
  6. android studio 配置签名
  7. android判断指定时间是否是当前时间
  8. 从Java类加载初始化到Android热修复
  9. android sqlite数据库的增删改查
  10. Android(安卓)音频播放速率调整实现