我创建了空应用。 ActionBar:设置图标和标题。内容:TextView with text" Hello!"。在style.xml中
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
</style>
<style name="AppTheme" parent="AppBaseTheme">
</style>
SDK
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="21" />
我手机中的Android 4.4.4。
首先出现的问题是,当主题Appcompat徽标的启动应用程序没有显示时。
Secod问题是我无法设置Holo主题。
清单
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:logo="@drawable/ic_launcher"
android:theme="@style/AppTheme">
style.xml
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
</style>
<style name="AppTheme" parent="@android:style/Theme.Holo">
</style>
答案 0 :(得分:0)
您可以直接在清单文件中执行此操作而无需调用样式
<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:logo="@drawable/ic_launcher" android:theme="@android:style/Theme.Holo" >