Android AppCompat revision 21 force Holo theme

南笙酒味 提交于 2019-12-19 02:39:13

问题


in my project I was using appcompat-v7 (revision 20), and my project was targeting android API level 19 (KitKat), so I could use Holo theme. I accidentally updated "Android Support Library" to revision 21, so I had to change the target in manifest to API level 21 (Lollipop).

Because of this, my app's default theme changed to Material (e.g. checkboxes are green). Is there a way to force using Holo theme again?

Manifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="my.package"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="21" />


    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        --- activities & receivers ---
    </application>

</manifest>

Style.xml:

<resources>

    <style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">

    </style>


    <style name="AppTheme" parent="AppBaseTheme">
    </style>

</resources>

回答1:


I finally solved this problem by downloading the "Android support repository" and by converting the .aar project to a library using @CommonsWare converter.



来源:https://stackoverflow.com/questions/26441834/android-appcompat-revision-21-force-holo-theme

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