What is the difference between TextView and TextViewCompat

I need to know what the actual difference is between TextView and TextViewCompat . When will we use TextViewCompat ?

+12
source share
2 answers

In much the same way as other compatibility classes, it exists to provide backward compatibility for new features for older versions of Android.

If you compare the two, you will see the difference.

One such example is getMaxLines () . Typically TextViewthis requires an SDK level of 16. TextViewCompatrepresents such functions for SDK levels with 4.

+13

TextViewCompat developer.android

TextView, , :

textAllCaps, Gingerbread.    ViewCompat.    backgroundTint backgroundTintMode.

+1

Source: https://habr.com/ru/post/1624080/


All Articles