被显示在一个活动的操作栏应用程序启动图标 [英] Application launcher icon being displayed on action bar of an activity

查看:102
本文介绍了被显示在一个活动的操作栏应用程序启动图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在显示我的操作栏中的应用程序图标,我不希望它出现在动作条上。 我已经修改了AndroidManifest.xml中并删除安卓?图标的活动元素,即使在当时显示的图标

 <应用
    机器人:allowBackup =真
    机器人:图标=@可绘制/ IC
    机器人:标签=@字符串/ APP_NAME
    机器人:主题=@风格/ AppTheme>
    <活动
        机器人:名称=com.storelocator.StoreLocatorActivity
        机器人:标签=@字符串/ APP_NAME
        机器人:configChanges =方向|屏幕尺寸>
        <意向滤光器>
            <作用机器人:名称=android.intent.action.MAIN/>

            <类机器人:名称=android.intent.category.LAUNCHER/>
        &所述; /意图滤光器>
    < /活性GT;
< /用途>
 

解决方案

呼叫 setDisplayShowHomeEnabled(假)在您的活动。这将隐藏图标。

On my action bar application icon is being displayed, I don't want it to appear on action bar. I have modified the androidmanifest.xml and removed android:icon from activity element, even then the icon is being displayed?

<application
    android:allowBackup="true"
    android:icon="@drawable/ic"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.storelocator.StoreLocatorActivity"
        android:label="@string/app_name" 
        android:configChanges="orientation|screenSize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application> 

解决方案

Call setDisplayShowHomeEnabled(false) in your activity. That will hide the icon.

这篇关于被显示在一个活动的操作栏应用程序启动图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆