对android:textAlignmentStyle 属性参数的理解
16lz
2021-01-26
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
更多相关文章
- Shape添加阴影效果
- 纯Java代码写登录注册页面
- ParallaxViewPager:ViewPager的视差背景效果
- Android开发:使用CardView实现卡片式设计
- android Textview 循环滚动效果
- Android(安卓)Annotations 仿微博Tabbar
- 自定义的跑马灯控件
- 让Android的手机QQ崩溃未响应的指令---亲测有效果
- Android(安卓)Gitlab CI/CD脚本