Tech tip of this week

Android: How to Remove App icon from Action Bar

we can remove the app icon from android in 2 ways.We can declare either in styles or in code.


<!-- Application theme. -->
<style name="AppTheme" parent="android:Theme.DeviceDefault.Light">
        <item name="android:actionBarStyle">@style/MyApp.ActionBar</item>

<style name="App.ActionBar" parent="android:Widget.Holo.Light.ActionBar.Solid">
        <item name="android:displayOptions">showTitle</item>

onCreate() method in activity or fragment:

No comments:

Post a Comment