android:layout_gravity="top/right"
出错的是这一句。
实际上应该是:
android:layout_gravity="top|right",这里的top和right的关系是并行的。
再说说layout_gravity的用法:
<p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">属性可选的值有:</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">top、bottom、left、right、center_vertical、fill_vertical、center_horizontal、fill_horizontal、center、fill、clip_vertical。</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">而且这些属性是可以多选的,用“|”分开。</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">默认这个的值是:Gravity.LEFT</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">来自:</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">http://blog.csdn.net/wanderocn/article/details/6424876</p>

更多相关文章

  1. Android(安卓)animation - 基础
  2. Android(安卓)环形布局: FloatingActionButton + ConstraintLayou
  3. Android(5)---Toast用法总结
  4. android html 与webview属性从冲突
  5. android启动页白屏的问题
  6. 3.23-
  7. 腾讯微博android授权 SharedPreferences用法
  8. android8.0应用崩溃 Only fullscreen opaque activities can req
  9. NineOldAnimations 设计解析

随机推荐

  1. Android(安卓)WebRTC 音视频开发总结(二)
  2. 从J2EE转向Android的第十二天 -----继续
  3. Android(安卓)jogball 驱动分析 (转)
  4. Android中动画效果alpha、translate、sca
  5. android adt与android sdk介绍
  6. 2012年度最受欢迎中国开源软件评选
  7. android SQLite 优化(一)insert优化 1
  8. Android(安卓)studio设置字体格式之Typef
  9. Android布局管理器(贞布局)
  10. android-async-http使用