Difference between Android Framework widgets and their version of AppCompat

Recently, I noticed that there AppCompat versions of most types View in Android, for example, ListView/ ListViewCompat Button/ AppCompatButton, and others.

For these simpler views (not counting, for example, SwitchCompat), what is the difference between them and the version of the Android Framework? I did not find any documentation on this ...

I am interested to know about the consequences of choosing any version and if there are any advantages in choosing one of them.

In particular:

  • Difference between ListViewandListViewCompat
  • The difference between Button/AppCompatButton
  • The difference between ImageView/AppCompatImageView
  • The difference between EditText/AppCompatEditText
  • The difference between TextView/AppCompatTextView

I changed from normal to the version of AppCompat with the expectation that the colors will be used from the theme and look the same on lollipop and pre-lollipop, but this is more likely the opposite effect on some types (for example, as ListView) p>

+4
source share
1 answer

AppCompat supports an older version of android os, for example, AppCompat-v7 is support from android 6.1.1 to android 2.6.0

for the above reason, they have not created the AppCompat classes below the widgets in this support library.

from the documentation

Full list of widgets available in appcompart

AppCompatAutoCompleteTextView
AppCompatButton
AppCompatCheckBox
AppCompatCheckedTextView
AppCompatEditText
AppCompatMultiAutoCompleteTextView
AppCompatRadioButton
AppCompatRatingBar
AppCompatSpinner
AppCompatTextView

ListViewCompat is a subclass of ListView the same different


edited by:

Android?

+3

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


All Articles