Android框架部件和他们的应用程序兼容性版本之间的区别 [英] Difference between Android Framework widgets and their AppCompat version

查看:1356
本文介绍了Android框架部件和他们的应用程序兼容性版本之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近注意到,有Android中最视图类型,例如的ListView / ListViewCompat 的应用程序兼容性版本,按钮 / AppCompatButton 等。

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

有关这些更简单浏览次数(不包括例如SwitchCompat),什么是他们和Android Framework版本之间的区别?我还没有发现任何文件,在这个问题上...

For these more simple Views (not counting for example SwitchCompat), what are the difference between them and the Android Framework version? I have not found any documentation on this matter...

我想知道选择任一版本和后果是否有艇员选拔一个比其他任何优势。

I'm interested in knowing the consequences of choosing either version and if there are any advantages in chosing one over the other.

具体做法是:


  • 的ListView ListViewCompat
  • 的区别
  • 之间的差异按钮 / AppCompatButton

  • ImageView的区别 / AppCompatImageView

  • 的EditText / AppCompatEditText
  • 的区别
  • 的TextView / AppCompatTextView
  • 的区别
  • Difference between ListView and ListViewCompat
  • Difference between Button / AppCompatButton
  • Difference between ImageView / AppCompatImageView
  • Difference between EditText / AppCompatEditText
  • Difference between TextView / AppCompatTextView

我是从正常状态变为应用程序兼容性的版本与期望的颜色会从主题中使用和看起来一样的棒棒堂和pre-棒棒糖,而在于对一些看法相反的效果(如ListView控件)

I changed from normal to AppCompat versions with the expectation that colors would be used from the theme and look the same on Lollipop and pre-lollipop, but it rather had the opposite effect on some views (such as ListView)

推荐答案

应用程序兼容性是支持Android操作系统就像应用程序兼容性-V7的旧版本在Android 6.1.1支持到Android 2.6.0

AppCompat is support older version of android os like AppCompat-v7 is support from android 6.1.1 to android 2.6.0

以上。

文档

色调知道小部件的appcompart提供的完整列表。

The full list of tint aware widgets available in appcompart

AppCompatAutoCompleteTextView
AppCompatButton
AppCompatCheckBox
AppCompatCheckedTextView
AppCompatEditText
AppCompatMultiAutoCompleteTextView
AppCompatRadioButton
AppCompatRatingBar
AppCompatSpinner
AppCompatTextView

ListViewCompat是的ListView 同他人

ListViewCompat is subclass of ListView same others

编辑:

为什么既类框架可用或 Android的支持库是如何工作的

这篇关于Android框架部件和他们的应用程序兼容性版本之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆