问题
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