延伸活动,ActionbarActivity与放大器之间的差异; AppCompactActivity? [英] Difference between extending Activity,ActionbarActivity & AppCompactActivity?
问题描述
在Android的什么是扩展活动,ActionBarActivity与放大器之间的主要区别; AppCompactActivity?如何将这些类彼此使用方面有什么不同?
In Android what is the main difference between extending Activity,ActionBarActivity & AppCompactActivity? How do these classes differ from each other in terms of usage?
推荐答案
- 延长<一href="http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html"><$c$c>ActionBarActivity$c$c>为您提供
动作条
小号功能每个API级别> = 7 - 通过扩展
活动
您可避免增加额外的项目/库到您的项目,但你会缺乏动作条
下面11 李API等级>
修改:更多详细信息:
ActionBarActivity
是支持库。支持库用于在旧平台提供新功能。例如,动作条
被引入API 11,是活动的一部分
默认情况下(根据主题实际上) 。与此相反,没有动作条
上了年纪的平台。因此,支持库增加了一个子类活动的
(<$ C C $> ActionBarActivity ),提供了动作条
的功能和UI
ActionBarActivity
is part of the Support Library. Support libraries are used to deliver newer features on older platforms. For example the ActionBar
was introduced in API 11 and is part of the Activity
by default (depending on the theme actually). In contrast there is no ActionBar
on the older platforms. So the support library adds a child class of Activity
(ActionBarActivity
) that provides the ActionBar
's functionality and ui
EDIT2 :2015年更新四月 - 它看起来像 ActionBarActivity
是pcated在德$ P $修订22.1。 0
的支持库。 <一href="http://developer.android.com/reference/android/support/v7/app/AppCompatActivity.html"><$c$c>AppCompatActivity$c$c>而应使用
edit2: Update April 2015 - it looks like the ActionBarActivity
is deprecated in revision 22.1.0
of the Support Library. AppCompatActivity
should be used instead.
这篇关于延伸活动,ActionbarActivity与放大器之间的差异; AppCompactActivity?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!