TextView 和 MaterialTextView 的区别?
Difference between TextView and MaterialTextView?
我知道 TextView 和 AppCompatTextView 之间的区别。但是 TextView 和 MaterialTextView 呢?细微差别是什么?以及什么时候需要使用MaterialTextView?
根据官方文档here
MaterialTextView supports all of the standard attributes that can be
changed for an AppCompatTextView. Unlike the AppCompatTextView which
supports specifying the line height only in a view layout XML,
MaterialTextView supports the ability to read the line height from a
TextAppearance style, which can be applied to the MaterialTextView
either using the style attribute or using the android:textAppearance
attribute
.
我知道 TextView 和 AppCompatTextView 之间的区别。但是 TextView 和 MaterialTextView 呢?细微差别是什么?以及什么时候需要使用MaterialTextView?
根据官方文档here
MaterialTextView supports all of the standard attributes that can be changed for an AppCompatTextView. Unlike the AppCompatTextView which supports specifying the line height only in a view layout XML, MaterialTextView supports the ability to read the line height from a TextAppearance style, which can be applied to the MaterialTextView either using the style attribute or using the android:textAppearance attribute
.