Difference between Android Framework widgets and their AppCompat version

前端 未结 2 888
遇见更好的自我
遇见更好的自我 2021-02-18 21:50

I have lately noticed that there are AppCompat versions of most View types in Android, for example ListView / ListViewCompat, Button /

2条回答
  •  無奈伤痛
    2021-02-18 22:11

    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?

提交回复
热议问题