简体   繁体   中英

Holo Theme and SDK minimum

setting the sdk minimum 15, should I use Theme.Holo and not Theme.AppCompat

And instead, it is always as if I had given compatibility for Android versions 2.1 and higher.

In this guide: http://developer.android.com/training/basics/actionbar/adding-buttons.html

when I have to add the search action, the ActionBar, are forced to use xmlns: yourapp = " http://schemas.android.com/apk/res-auto " to be able to give the right showAsAction ...

Same problem to set the Holo theme, this is not available, and returns me error (You need to use a Theme.AppCompat theme with this activity), and are forced to use AppCompat.

I then tried to create a new project with SDK minimun 16, thinking that the problem was on the 15th, and when I go to res \\ values ​​\\ styles.xml I always find parent = "Theme.AppCompat.Light.DarkActionBar"

The only way to use Holo, is creating a project with minimum 21 SDK.

The only way to not use AppCompat is to not use AppCompat. If you extend ActionBarActivity you have to use a theme that inherits from Theme.AppCompat . If you want to use Holo themes, you have to extend Activity .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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