Constant Value Description
inherit 0 Default
gravity 1 Default for the root view. The gravity determines the alignment, ALIGN_NORMAL, ALIGN_CENTER, or ALIGN_OPPOSITE, which are relative to each paragraph’s text direction
textStart 2 Align to the start of the paragraph, e.g. ALIGN_NORMAL.
textEnd 3 Align to the end of the paragraph, e.g. ALIGN_OPPOSITE.
center 4 Center the paragraph, e.g. ALIGN_CENTER.
viewStart 5 Align to the start of the view, which is ALIGN_LEFT if the view’s resolved layoutDirection is LTR, and ALIGN_RIGHT otherwise.
viewEnd 6 Align to the end of the view, which is ALIGN_RIGHT if the view’s resolved layoutDirection is LTR, and ALIGN_LEFT otherwise

1. TextView  的代码


效果:

center


textEnd、viewEnd、


inherit、gravity、textStart、viewStart



更多相关文章

  1. Shape添加阴影效果
  2. 纯Java代码写登录注册页面
  3. ParallaxViewPager:ViewPager的视差背景效果
  4. Android开发:使用CardView实现卡片式设计
  5. android Textview 循环滚动效果
  6. Android(安卓)Annotations 仿微博Tabbar
  7. 自定义的跑马灯控件
  8. 让Android的手机QQ崩溃未响应的指令---亲测有效果
  9. Android(安卓)Gitlab CI/CD脚本

随机推荐

  1. Android常用的几个命令
  2. Android线程优先级设置方法技巧
  3. Android中解析JSON(一)
  4. Android 输入法/ 软键盘 显示模式 设置(an
  5. android跨进程通信(IPC)——AIDL
  6. Android(安卓)使用shape
  7. Android Push
  8. Android配置build.gradle自动化编译signi
  9. Android 下的 bolts tasks
  10. Android桌面二:Android桌面widget