启动画面问题?

时间:2010-10-11 10:50:29

标签: java android eclipse

您好我已经创建了一个启动画面,但我不知道如何启动它。我已经尝试将它放在顶级文件夹中,但我无法启动它,我意识到这是因为它是我在我的应用程序上创建的最后一项。

如何将其置于构建路径的顶部。

1 个答案:

答案 0 :(得分:1)

您是否已将Splashscreen放入清单中。 应将Splashscreen作为第一个活动,然后是主要活动。 例如: //第一个活动为Splashscreen

活动android:name =“。SplashScreen”

 android:screenOrientation="portrait"
              android:label="@string/app_name"
              android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

// Splashscreen活动在此结束

您的主要活动,然后是剩余的活动。

    <activity android:name=".Aptv"
              android:label="@string/app_name"
              android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
              android:screenOrientation="portrait">
        <intent-filter>
            action android:name="com.ayansys.aptv.Aptv" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>