Viacheslav Khailenko
Viacheslav Khailenko

Reputation: 171

Difference between TextView and MaterialTextView?

I know about difference between TextView and AppCompatTextView. But what about TextView and MaterialTextView? What are the nuances? And when we need to use MaterialTextView?

Upvotes: 6

Views: 4764

Answers (1)

Muhammad Junaid Khalid
Muhammad Junaid Khalid

Reputation: 351

According to the official documentation 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

.

Upvotes: 9

Related Questions