Changing Theme.Holo on Android Manifest.xml file doesn't run on Android

喜欢而已 提交于 2019-12-07 15:17:32

If your Activity is an ActionBarActivity then you need to use one of the Theme.AppCompat variants (i.e. Theme.AppCompat, Theme.AppCompat.Light, &c).

From the Styling the Action Bar page:

Note: If you are using the Support Library APIs for the action bar, then you must use (or override) the Theme.AppCompat family of styles (rather than the Theme.Holo family, available in API level 11 and higher). In doing so, each style property that you declare must be declared twice: once using the platform's style properties (the android: properties) and once using the style properties included in the Support Library (the appcompat.R.attr properties—the context for these properties is actually your app).

Don't forget about the "add the properties twice" part.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!