I am looking for a solution to align menu icon in the action bar without creating a custom layout.
This question was asked many times, and no one seems able to answer.
Here the last question I found on stack overflow (asked in June 2015):
"How to center&left&right align the ActionBar icons in Android " How to center&left&right align the ActionBar icons in Android
The toolbar is available only for sdk v23 with a very limited features for the previous release.
A custom layout, does not help as you need to manage different screens size and so a number of icons showing on your actionBar.
So any help will be appreciated.
J.
Related
I am trying to customize a action bar so that it looks like which is an IOS liked navigation bar. Here are some articles that i found. link1
It seems impossible to change tabs position and size in android. i had read another stack overflow page which suggest to put a few buttons.
Is there anyway I can make such action bar with one button on the left, on button on the right and a tabs in the middle.
Here's an awesome Tutorial about Android Material Tabs. The tutorial explains about all basic modification that can be done on Tabs. It also teaches to use CustomAdapter to build our own Tab style as you wanted.
I need to add a navigation icon to my Toolbar, and I cannot use an ActionBar. Where is the default up button you'd get from using an ActionBar with homeAsUp enabled?
You can find loads of material design icons here, the pack also contains the up arrow.
You can find the default icons for android in \path-to-your-android-sdk-folder\platforms\android-xx\data\res, your question is not very clear so if my answer doesn't fit, please give more details on what you want to realize , and maybe with illustrations.
When in some apps, there are those 3 dots in the top right of the app, on the action bar (not the home buttons), which allow for more options. In my app I have on, but I do not know how to make it do a method when it is clicked. Do I use android:onClick="METHOD_NAME ? Or do I need to setup a button variable in my activity class and setup and onClickListener? I have already tried both but I may be doing something wrong.
That three dots are the menu in the action bar. They are always shown on devices without a menu key.
See also the documentation for more details.
Three dots are called Overflow(very aptly named) and to use them you need to use ActionBar which is the top long, horizontal bar showing icons, other buttons along with the Overflow button.
Now in some devices where there is no physical menu button you will always see Overflow button.
Go through Docs and tutorials related to ActionBar but keep one thing in mind that ActionBar is only available for devices with android above HoneyComb. For android devices below 3.0 such as GingerBread or Froyo you will have to use compatibility libraries, so that will be an additional task.
And most notable libraries for this purpose are ActionBarSherlock and AppCompat.
how to make the bar in the top of the picture (see the link) (drawerbutton,"mes cercles",picture_pen)? by customizing the action bar or i make it manually?
https://drive.google.com/folderview?id=0B6Cz2zvfARSdOHJKSEppSzd6ZHM&usp=sharing
The ActionBar in that screenshot is custom-made. It is not built using Android's ActionBar controls. It appears that it was created using a RelativeLayout with a custom background, 1 button on each side and text in the middle of the layout. You can do this as well, however, it is considered best-practice to use Android's ActionBar, which can be themed partially. (Background, text color, buttons, logo, etc...)
Since Android's ActionBar is relatively new, you should use ActionBarSherlock, which adds compatibility to Android 2.x.
http://actionbarsherlock.com/
You can customize the actionbar in android to a very good extent , give it a solid / gradient background , customize the font face , add buttons , event give to different round corner values, also tabs are available , i suggest that method so you don't need plug-ins
the below two posts might be useful
android developers page / actionbar
Using the Android action bar (ActionBar) - Tutorial - Vogella
Hi I am a newbie to android.I need to know how to design this type of layout using xml they are using imagebuttons in bottom for all layouts
What is the bottom part called Is it Bottombar or tabbar or actionbar or Menubar.
P.S: I want to design on android 2X version. Please dont say refer to developer.android because i didn't find a satisfatory answer
You can use ActionbarSherlock for designing action bars for 2.x android versions. If you want action bar at the bottom, you can use split action bar which is supported by it.