Android Based control -- CBAlignTextView
来源:互联网 发布:阿克苏怎样优化网站 编辑:程序博客网 时间:2024/05/20 23:59
我们都十分熟悉TextView的使用,但是还有一个不错的控件CBAlignTextView
使用步骤:
- build.gradel加入dependencies
compile ‘me.codeboy.android:align-text-view:2.3.0’ xml中
<me.codeboy.android.aligntextview.CBAlignTextView
android:id="@+id/cbAlignTv"
android:textIsSelectable="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
特点:
- 支持复制
- 排版效果较好
注意:
由于Android L(5.0)之后对中文的版本进行了变化,造成不能由中文标点作为行首,所以为了能够使CBAlignTextView看起来更加工整,建议将中文符号用英文符号替换(默认不转换)
解决:
- 使用转化函数转化标点符号: CBAlignTextViewUtil.replacePunctuation("");
源码: public static String replacePunctuation(String text) {
text = text.replace(',', ',').replace('。', '.').replace('【', '[').replace('】', ']')
.replace('?', '?').replace('!', '!').replace('(', '(').replace(')', ')').replace
('“', '"').replace('”', '"');
return text;
}
根据自己的需求使用
- Android Based control -- CBAlignTextView
- VivantList: A Control Based List View Control
- Configuring Context-Based Access Control
- yii Role-based access control
- Chapter 11: Using Menu-Based Controls--Menu-based control events
- 《Role-Based.Access.Control》RBAC电子版下载
- TightVNC: VNC-Based Free Remote Control Solution
- Role-based access control in SELinux
- RBAC(Role-Based Access Control)
- Role-based access control continue 1
- Role-based access control continue 2
- Embedded Microcontroller based Computer Numerical Control
- Model-Based Tests for Access Control Policies
- Quorum-based voting for replica control
- Column based selection in rich edit control.
- oracle 12c code based access control
- Spring Security#Expression-Based Access Control
- 【android】Location-based Service
- 从cobar到mycat的基本使用
- 从感知器到神经网络
- cordova学习五 真机调试
- HDU 2020 JAVA
- 伯努利分布(Bernoulli distribution)
- Android Based control -- CBAlignTextView
- Java泛型详解
- Supervisor重新加载配置启动新的进程
- 1012 太繁琐,写的太差
- [IOS APP]简爱跑步12周
- Java 泛型-泛型类、泛型方法、泛型接口、通配符、上下限
- 测试策略与架构
- HDU 2021 JAVA
- Java中的泛型方法