I have lately noticed that there are AppCompat versions of most View types in Android, for example ListView
/ ListViewCompat
, Button
/
AppCompat is support older version of android os like AppCompat-v7 is support from android 6.1.1 to android 2.6.0
for above reason they have created AppCompat classes of below widgets in this support library nothing more.
from Documentation
The full list of tint aware widgets available in appcompart
AppCompatAutoCompleteTextView
AppCompatButton
AppCompatCheckBox
AppCompatCheckedTextView
AppCompatEditText
AppCompatMultiAutoCompleteTextView
AppCompatRadioButton
AppCompatRatingBar
AppCompatSpinner
AppCompatTextView
ListViewCompat is subclass of ListView same others
edited:
why both class available in framework or How Android Support Library work?
If you use AppCompatActivity, then AppCompatImageView will automatically be used when you use ImageView in your layouts.
From the AppCompatImageView AppCompatEditText AppCompatButton
Button vs AppCompatButton
This will automatically be used when you use Button in your layouts and the top-level activity / dialog is provided by appcompat. You should only need to manually use this class when writing custom views.
ImageView vs AppCompatImageView
This will automatically be used when you use ImageView in your layouts and the top-level activity / dialog is provided by appcompat. You should only need to manually use this class when writing custom views.
EditText vs AppCompatEditText
This will automatically be used when you use EditText in your layouts and the top-level activity / dialog is provided by appcompat. You should only need to manually use this class when writing custom views.
and the same rule is also valid for other appcompat views