Android Action Bar : App Icon & Title - android

Is it possible to use fragment tabs on action bar with the Theme.Holo.NoActionBar theme?
I mean... I already use this theme on my layouts but apparently it is overriden since the fragments have to show up in the action bar?
What I wanted to achieve is to actually get rid of the Title and App Icon over the fragment tabs. Something similar to the Google Music app.
Is this possible?

What I wanted to achieve is to actually get rid of the Title and App Icon over the fragment tabs. Something similar to the Google Music app.
Try calling setDisplayShowHomeEnabled(false) and setDisplayShowTitleEnabled(false) on your ActionBar, and leave the theme alone.

You can style the action bar based on your needs. I'm quite certain you can also remove the app icon and title from there. Using a NoActionbar theme by default and then recreating the action bar on your own kinda defeats the purpose of the action bar. I suggest you use a theme with action bar and then style the bar according to your needs. This page has a decent implementation.

Related

hiding application logo and title displayed for a fraction of seconds before starting of activity if custom action bar layout is used

With reference to question raised at SO link :
Hide application launcher icon in title bar when activity starts in android
What should I do if I don't want to use even a logo ?
What should I do if I don't want to use even a logo ?
You can use Toolbar instead of old ActionBar. Here's a great and quick tutorial for Toolbar implementation.

FitsSystemWindows with translucent status bar and action bar tabs

In the app I am currently working on, I am working on implementing the translucent status bar with action bar tabs. I hide the ActionBar and only show the tabs.
My problem is that now, the system lets space for the action bar that is not there so FitsSystemWindows is making an error.
How can I fix that?
Thanks
The actual solution that time was quite dirty: I needed to set a custom padding from the top (I think it was 47dp or something like that) to the ViewPager (I think it was the ViewPager).
The real solution has come with AppCompat that fixes such issues: So use AppCompat!

Customize Navigation Drawer Action Bar (App Compact) in android

I want to customize navigation drawer app compact action bar, I want to remove app icon from that and want to make its title center in action bar.
I have applied all solutions , but nothing is working with all the conditions.
Please give me some clue for applying it correctly
You should creat a customize action bar. Then, if you want you can add a button that can open and close your drawerlayout.
I have solved my problem. As mentioned, I have two problems, and I solved that in following way :
1) For making title centre, we need to make custom layout of action bar, and need to remove action bar title.
2) for remove app icon from action bar, we need to set android:icon property of that activity in manifest with transparent image or colour.

Android theme, fullscreen and the action bar

I have have some problems with devices that have the action bar. When running on a phone I want to go fullscreen with no title bar and no status bar. On tablets I want to show the action bar but still no title bar. Minsdk is 7! The method setTheme doesn't work when you toggle fullscreen so I can't have two themes. Is there a way to show the action bar in fullscreen mode? The support library doesn't support the Action bar.
The only reason I want to do this in the first place is cause they for no good reason at all broke the backward compability by moving the menu key to the action bar. The easy solution for this according to the docs is to add android:showAsAction="ifRoom" to the menu items. But that does absolutly nothing.
I've also tested numerous solutions I found on google that supposedly toggles fullscreen. None of them work on any of my devices so please do not point to something you've read if you haven't used it yourself.
EDIT: I Solved this. The problem seems to be that you have to specify a Holo theme to get the action bar back. Otherwise it won't show. I added this in my main Activity.
#Override
public void setTheme(int resid) {
if(isTablet(this))
{
super.setTheme(android.R.style.Theme_Holo);
return;
}
super.setTheme(resid);
}
On tablets I want to show the action bar but still no title bar
The action bar replaces the title bar. There is no concept of an activity having an action bar and a title bar.
Is there a way to show the action bar in fullscreen mode?
AFAIK, no, by definition.
The support library doesn't support the Action bar.
ActionBarSherlock provides a backport of the action bar for API Level 7 and higher.
The easy solution for this according to the docs is to add android:showAsAction="ifRoom" to the menu items. But that does absolutly nothing.
It certainly "does nothing" if you have no action bar. If you want a fullscreen experience, then you will need to roll your own menu replacement. IMHO, most fullscreen apps did this already (e.g., a game going with a game-styled "menu").

How to make non-clickable App Icon on Action Bar like YouTube App in android

I want to add non clickable App Icon on Action Bar like YouTube app have app icon on Top-Left of screen.Currently App Icon on Action behave like button.
Please see to know about app icon:
http://developer.android.com/design/patterns/actionbar.html
I think you are looking for getSupportActionBar().setHomeButtonEnabled(false); for appCompat. If you aren't using appCompat, then just getActionBar().setHomeButtonEnabled(false) assuming your activity is extending ActionBarActivity.

Categories

Resources