从谷歌导航栏上拖动Android更改应用程序徽标

Ros*_*pin 0 android

嗨,我想在谷歌导航栏上拖动时更改我的应用程序徽标.这是我的申请清单:

    <application
    android:theme="@android:style/Theme.Holo.Light"
    android:icon="@drawable/ic_launcher"
    android:logo="@drawable/ic_launcher"
    android:screenOrientation="portrait"
    android:debuggable="false"
    android:label="@string/app_name" >
Run Code Online (Sandbox Code Playgroud)

〔实施例

adn*_*eal 7

在你AndroidManifest,添加此intent-filtermeta-dataActivity你想,当你向上滑动即可推出.

        <intent-filter>
            <action android:name="android.intent.action.ASSIST" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>

        <meta-data
            android:name="com.android.systemui.action_assist_icon"
            android:resource="@android:drawable/sym_def_app_icon" />
Run Code Online (Sandbox Code Playgroud)

第一次向上滑动时,将显示通用搜索图标.选择"始终"使用您的应用作为默认辅助操作后,将显示您在AndroidManifest中指定的图标.另外,请记住这不是官方的.通常,您无法修改SystemUI,但这是一种特殊情况.

例