Remove Application Icon and Title from Honeycomb Action Bar

Remove application icon and title from Honeycomb action bar

Call setDisplayShowHomeEnabled() and setDisplayShowTitleEnabled() on ActionBar, which you get via a call to getActionBar().

Can i hide the App Icon from the Action Bar in Honeycomb?

Yes, you can hide the app icon and title. You can also replace the app icon with a wider logo image for your activity.

The app icon/logo at the left is collectively treated as a "home" affordance. You can optionally ask the system to display it as "up." When tapped, this should take the user either to a home/landing page for your app or one level up in the app's navigation hierarchy, respectively.

This complements the system back button by providing a consistent way for the user to move around your app when the history associated with the back button might be complex. (For example, the user might have been deep-linked into your app through a notification or an intent from another application.) By using this pattern your app won't need to hijack the normal behavior of the back button in special cases for convenience.

The action bar does double duty in the form of action modes. The two APIs are orthogonal but the resulting UI occupies the same screen real estate. An action mode presents a set of contextually relevant options to the user as a customized action bar. For example, a user might select several items from a list at a time. The app might present an action mode to let the user take a bulk action on the set of all selected items such as delete or share.

Action modes are a great way to present contextual actions that doesn't stop the user from interacting with the rest of the UI the way that popup menus do.

Design guidelines will hopefully be published "soon." :)

How to remove Application icon from Action Bar in Android?

actionBar.setDisplayUseLogoEnabled(false); should do it.

Remove Action Bar icon but keep the UP button

This code will remove the menu icon and keep the indicator near it:

<style name="MyTheme" parent="Theme.Sherlock.Light">
<item name="actionBarStyle">@style/MyActionBarStyle</item>
</style>

<style name="MyActionBarStyle" parent="Widget.Sherlock.Light.ActionBar">
<item name="android:icon">@android:color/transparent</item>
<item name="icon">@android:color/transparent</item>
</style>

How can I remove title and icon completetly in Actionbar sherlock?

Your "menu items" will never appear be aligned to the left. They will be aligned to the right. The left is for your title and icon (presently removed) and navigation (tabs, list, etc.). If you have enough action bar items, they will flow over to the left side, but they will always start from the right. This cannot be altered via the Android SDK.

Remove icon/logo from action bar on android

If you've defined android:logo="..." in the <application> tag of your AndroidManifest.xml, then you need to use this stuff to hide the icon:

pre-v11 theme

<item name="logo">@android:color/transparent</item>

v11 and up theme

<item name="android:logo">@android:color/transparent</item>

The use of these two styles has properly hidden the action bar icon on a 2.3 and a 4.4 device for me (this app uses AppCompat).

Removing app icon and text from ActionBar

setDisplayShowHomeEnabled(false);

Remove the title text from the action bar in one single activity

For this kind of simple stuff you just have to go to the source to find the answer:
here the full explanation: http://developer.android.com/guide/topics/ui/actionbar.html#Dropdown

and here some guide code, to include the spinner on the action bar:

 ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);

after that is just put a listener for the changes and setting the a spinner adapter.

and you can use:

 setTitle("");

to remove the title.
I've been checking on my codes here, you can also give a try on:

 requestWindowFeature(Window.FEATURE_NO_TITLE);

It should just remove the title, and leave the title bar. Remember that you must call this before setContentView

happy coding.

Removing an icon from the Actionbar

The solution is this:

((View)findViewById(android.R.id.home).getParent()).setVisibility(View.GONE);

as seen on: https://github.com/JakeWharton/ActionBarSherlock/issues/327#issuecomment-10593286

Using actionBar.setDisplayShowHomeEnabled(false) hides the icon, but your actionbar ends up being below the viewpager tabs (if you're using any)



Related Topics



Leave a reply



Submit