Can anyone tell me how to do the following,
Remove The App Title bar & keep the action bar.
Move Tab Bar(Action Bar) to the bottom of the screen.
Remove Swipe Feature from the Tab.
Do this
Myactionbar().setDisplayShowTitleEnabled(false); Myactionbar().setDisplayShowHomeEnabled(false);
Where my action bar is the name of your action bar
you can add
android:theme="#android:style/Theme.NoTitleBar"
in your manifest file for your activity
We have to clarify some contents of your question:
the "app title bar" is part of the Action Bar, so they are the same thing; in other words you can't "divide" them, at last you can delete the title of your application;
you can't move the Action Bar to the bottom of the screen, but you can split it, as it says this official link (see Using split action bar paragraph); this can be do only if Action Bar is activated;
if you want to remove swipe feature from tab, see this StackOverflow question.
As you can see on this link and in this one, tabs on bottom are discouraged by Google (i don't wanna launch a discussion about this, forgive me).
But of course, you are free to do whatever you want with your app, and i found very usefull this solution.
That's all i can do. If you get struck again, post your code.
requestWindowFeature(Window.NO_ACTION_BAR)
would do the trick ! Do it before setting the content view.
To remove the very top bar Inside your oncreate() method place this
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
Now for the action bar to move it to the bottom there is no preset it can only be placed on the top unless you make your own interface visit this link
http://android-ed.blogspot.ca/2011/12/using-actionbar-at-bottom-of-screen.html
Hope that helps !
Related
I want bottom bar in application home page and top bar also what i can do for it
for create bottom tab bar
http://envyandroid.com/align-tabhost-at-bottom/
but be carefuller http://developer.android.com/design/patterns/pure-android.html said avoid to use bottom bar..
I hope this help you...
this can be done by using toolbars. You can use one as ActioBar and another one for a buttom bar.
Have a look here:http://www.vogella.com/tutorials/AndroidActionBar/article.html
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.
Hello everyone,
The first two pictures from the top is currently what I have. The arrow changes images when you click it. I want to make the arrow(action item) closer to the title(sort by) due to design requirements. I have tried to add blank action items to push the arrow over closer to the title but will not work to the various screen sizes.I also realize that the action bar is quite limited as you can only add action items to the right of the action bar.
I gave an example by displaying the bottom two pictures. As you can see the arrow is close to the Chinese title.
Any Ideas will be greatly appreciated as I am quite stuck. Thanks in advance !
Regards,
Ryan
You might be able to tell what the Chinese app is doing via uiautomatorviewer. Possibilities include:
They are using the logo, where the Chinese characters and the arrow are both part of the graphic image. See setDisplayUseLogoEnabled().
They have disabled the title and are using a custom navigation view. See setCustomView().
Ive made an actionbar menu file and added it to my activity. The problem is its in the wrong place. Here is an image i found on android developer webpage:
At standard the actionbar was on location 1. When i a added a line like 'uiOptions="splitActionBarWhenNarrow"' into my manifest then the bar went to location 3. How can i make it stick to location 2 no matter what?
Also, how did they get that blue line under the action bar? :)
You cannot change the split Action Bar functionality, it is meant to be at the bottom when it is split. What Location 2 refers to are Action Bar tabs, not a split Action Bar.
Also, that "blue line" is part of the Action Bar's theme, which you can extend. This SO answer talks about changing the tab color specifically and provides a useful website to customize everything about the bar.
i'm pretty confused on how to use action bar sherlock.. i've 'installed' it successfully in my apps (I can already see the bar at the top of my apps), but how do I 'configure' it? for example i use this
<item name="abDisplayOptions">useLogo|showHome|homeAsUp|showTitle</item>
so I can see the apps logo in the action bar, the 'back' button at the left side of the logo, but I don't know where should I put the code (and what code to write) to enable the 'back' buttons on action bar, clicking on logo will bring the user to the apps home, and other things such as put a search icon on the action bar and so on.. i tried looking at the actionbarsherlock google groups but I don't know what to search to help me...
Just check the samples here : https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.demos
And the corresponding code here : https://github.com/JakeWharton/ActionBarSherlock