2 slaks SLaks 于 2013.08.28 11:02 提问

Launcher 中 Home按钮不能运行

我创建了一个 Android Launcher,可以正常的运行。现在的问题是当我点击 HOME 按钮时,不能直接跳到HOME 页面。如何实现呢?

Manifest file:

<?xml version="1.0" encoding="UTF-8"?>
<uses-sdk android:minSdkVersion="8" />

<uses-permission android:name="android.permission.INTERNET" />

<permission
    android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
    android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
    android:protectionLevel="normal" />
<permission
    android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"
    android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
    android:protectionLevel="normal" />
<permission
    android:name="com.android.launcher.permission.READ_SETTINGS"
    android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
    android:protectionLevel="normal" />
<permission
    android:name="com.android.launcher.permission.WRITE_SETTINGS"
    android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
    android:protectionLevel="normal" />

<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS" />

<application
    android:name="STB"
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
    <activity
        android:name=".testingactivity.CoverFlowTestingActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.HOME" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.MONKEY" />
        </intent-filter>
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.PagerLauncherActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.GameActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.CinemaActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.Black"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.CommunicationActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.InternetActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.LiveActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.MusicActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.SettingsActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.SocialActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.TvShowActivity"
        android:label="@string/app_name" >
    </activity>
    <activity
        android:name="pl.polidea.coverflow.testingactivity.ApplicationActivity"
        android:label="@string/app_name" >
    </activity>

    <receiver android:name="pl.polidea.coverflow.testingactivity.ApplicationBroadcastService" >
        <intent-filter>
            <action android:name="android.intent.action.PACKAGE_INSTALL" />
            <action android:name="android.intent.action.PACKAGE_ADDED" />

            <data android:scheme="package" />
        </intent-filter>
    </receiver>
</application>
Csdn user default icon
上传中...
上传图片
插入图片