![](/img/trans.png)
[英]What is the difference between paddingBottom and paddingEnd in a TextView?
[英]What is the difference between TextView and TextViewCompat
与其他兼容性类的方式大致相同,它可以为旧版Android的新功能提供向后兼容性。
如果你比较两者,你会看到差异。
一个这样的例子是getMaxLines() 。 在普通的TextView
,这需要SDK级别16. TextViewCompat
为4级SDK级别引入了这样的功能。
在developer.android中定义TextViewCompat
TextView支持旧版平台上的兼容功能,包括:
支持textAllCaps样式属性,可以回溯到Gingerbread 。 允许通过ViewCompat中的背景色调方法对其进行动态着色。 允许使用backgroundTint和backgroundTintMode设置背景色调。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.