Some Android Developer may not know well of Linearlayout . This may help you to know sth about the gravity of its chilren;

-------------------CONET ------------------

1) wahts the diffrence between "gravity " android "layout_gravity"?

gravity: is sth to itself; this tell how you want its content to layout; Its see a TextView ; provided its wd is 200; and its content (text ) measured wd is 150; This Gravity setting will make its text align left ? top? center ? etc...


layout_gravity: is sth to its parent ; this tells it;s parent how it wants to be layed out; Again this TextView in its parent Linearlayout; Provided parent wd is 300, ht is 400;


2) WHY Does my layout_gravity not work?

layout_gravity is sth relevent to its parent orentation;

If its orentation is horizontal , top , btm , center_vertical will be effective;

else if is vertical : left , right ,center_horizontal is effective;





----------------------END--------------------------

THAT ALL FOR TODAY ! MY POOR UBUNTU INPUT METHOD!!!

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. 利用Handler来修改Android的UI
  2. CyanogenMod 10 修改 Vold 使 Android(安
  3. Android中View和ViewGroup介绍
  4. 【Based Android】让你的android应用使用
  5. andriod环境的配置eclipse
  6. Android的隐私保护利器
  7. ANDROID 开机启动VNC SERVER
  8. Android手机搭建Linux服务器
  9. Android——用户登陆及用户名和密码的保
  10. android sdk 版本问题 R文件问题