Application launcher icon being displayed on action bar of an activity

懵懂的女人 提交于 2019-12-10 17:55:02

问题


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> 

回答1:


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



来源:https://stackoverflow.com/questions/15715309/application-launcher-icon-being-displayed-on-action-bar-of-an-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!