Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/214.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 我的主题在使用“后发生了变化”@风格/主题“;_Android_Android Activity_Themes - Fatal编程技术网

Android 我的主题在使用“后发生了变化”@风格/主题“;

Android 我的主题在使用“后发生了变化”@风格/主题“;,android,android-activity,themes,Android,Android Activity,Themes,我用的是果冻豆。如果我在活动中不使用Theme属性,它将使用“DefaultDevice”主题(我目前无法从清单中选择该主题,我不知道为什么)。如果我不需要删除标题栏,我就不会使用Theme属性 有没有什么方法可以使用Holo?我也不知道如何使用HoloEverywhere。我想为我的应用程序获得漂亮的编辑文本、按钮和微调器。当前的是主题。黑色,太糟糕了!:(必须类似于2.X android版本 这是我的清单文件: <?xml version="1.0" encoding="utf-8"?

我用的是果冻豆。如果我在活动中不使用Theme属性,它将使用“DefaultDevice”主题(我目前无法从清单中选择该主题,我不知道为什么)。如果我不需要删除标题栏,我就不会使用Theme属性

有没有什么方法可以使用Holo?我也不知道如何使用HoloEverywhere。我想为我的应用程序获得漂亮的编辑文本、按钮和微调器。当前的是主题。黑色,太糟糕了!:(必须类似于2.X android版本

这是我的清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.traincoders.impl"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk 
        android:minSdkVersion="10" 
        android:targetSdkVersion="17" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:allowBackup="true">
        <activity
            android:label="@string/app_name"
            android:name=".MainActivity" 
            android:theme="@android:style/Theme.Black.NoTitleBar">

        </activity>
        <activity
            android:name=".SettingsActivity"
            android:label="@string/settings_title"
            android:theme="@android:style/Theme.Black.NoTitleBar">
        </activity>
        <activity
            android:name=".SplashActivity"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

提前感谢。

在您的舱单中:

android:theme="@style/MyTheme"
values/styles.xml:

<style name="MyTheme" parent="android:Theme">
</style>
<style name="MyTheme" parent="android:Theme.Holo">
</style>

values-v11/styles.xml:

<style name="MyTheme" parent="android:Theme">
</style>
<style name="MyTheme" parent="android:Theme.Holo">
</style>


有了这个,你可以在后HC设备上看到Holo主题,在前HC设备上看到black主题。

Nice Ahmad,但我认为这是一个问题,因为我有(Android 2.3.3)在项目库中,它显示:检索项的父项时出错:未找到与给定名称“android:Theme.Holo”匹配的资源。是的,您必须根据蜂巢或更高版本构建它。我建议根据最新的SDK版本构建它(17)