简体   繁体   English

较旧版本的Android ActionBar

[英]Android ActionBar in older versions

I want to make android application include the action bar and this app working on versions 2.2 to the latest so as of my understand I have to make the application Android platform 2.1 (level 7) to platform 2.3.4 (level 10) and use the Support library v7 or make the platform 3.0 (level 11) and go on right? 我想让android应用程序包含操作栏,并且该应用程序在最新的2.2版上运行,据我所知,我必须将应用程序Android平台2.1(第7级)更改为平台2.3.4(第10级),并使用支持库v7或构建平台3.0(11级),然后继续吗? So as I want to make the application available from 2.2 to 4.3 with the same features and design which platform to use (2.2 or 4.3) and which one I include the support library and what is the values of (minSDKVersion = 8), maxSDKVersion = 18) and the targetSDKVersion = 18). 因此,由于我想使该应用程序在2.2到4.3之间可用,并且具有相同的功能,并设计要使用的平台(2.2或4.3),并且我要包括支持库以及哪个平台(minSDKVersion = 8),maxSDKVersion = 18)和targetSDKVersion = 18)。 When I do this the application don't run at all and make an error so I'm confused... I couldn't find a full example of this. 当我这样做时,应用程序根本无法运行并出错,所以我很困惑……我找不到完整的示例。 Note: I don't want to work with ActionBarSherlock library and also I got error when I try to extract the zip file downloaded from actionbarsherlock.com 注意:我不想使用ActionBarSherlock库,当我尝试提取从actionbarsherlock.com下载的zip文件时也出现错误。

ActionBarSherlock is a great library, but with a new project I'd start with ActionBarCompat from a Android Support Library. ActionBarSherlock是一个很棒的库,但是对于一个新项目,我将从Android支持库中的ActionBarCompat开始。 http://developer.android.com/tools/support-library/setup.html http://developer.android.com/tools/support-library/setup.html

You need to add android-support-v4 and android-support-v7 to add action bar support on Android. 您需要添加android-support-v4和android-support-v7才能在Android上添加操作栏支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM