布局layout时, 发现设置了android:layout_gravity="bottom"后view并没有底对齐, 查了下, 原来如下:

对于 LinearLayout

当 android:orientation="vertical"时, 只有水平方向的设置才起作用,垂直方向的设置不起作用。即:left,right,center_horizontal 是生效的。

当 android:orientation="horizontal" 时, 只有垂直方向的设置才起作用,水平方向的设置不起作用。即:top,bottom,center_vertical 是生效的。

http://blog.csdn.net/cnnumen/article/details/8290927

更多相关文章

  1. Android(安卓)自定义TextView 实现文本间距
  2. android:windowSoftInputMode属性使用
  3. Android之EditText 属性汇总
  4. Android系统中设置TextView的行间距(非行高)
  5. Android中自定义switch控件样式
  6. 设置android:sharedUserId="android.uid.system" 支持 sdcard读
  7. Android横向的选项卡
  8. android TextView的字体颜色设置的多种方法(续)
  9. Android设置透明、半透明等效果

随机推荐

  1. android发送restful风格的http请求
  2. Android应用程序键盘(Keyboard)消息处理机
  3. 阅读《Android 从入门到精通》(31)——Inte
  4. FregServer进程,获取ServiceManager代理对
  5. Android Studio查看错误信息
  6. 百度地图android开发资料
  7. Android 通过按键旋转屏幕
  8. 2011.07.19——— android intent 传递li
  9. 高德地图自定义点聚合样式Android
  10. android 实现模拟按键