Custom menu in toolbar in android. - java

I want to create a menu similar to this.
Please guide me to do that. Thanks.

Start by following this: https://developer.android.com/training/appbar/actions.html
It specifically shows adding buttons to the bar but in the same xml you can set them to show up as a menu like you want.

Related

Design xml menu in Android Studio not display objects (buttons, textview etc)

I get a strange problem. When I open design-menu for redacting xml file (Activity or Fragment) I dont see elements(buttons, textviews etc).
Picture:
How can I fix this?
This looks like a render problem, please click on the top right red exclamation mark to see the exact error.
For the time being, you can change the display theme to resolve the problem. Click on AppTheme in the top menu, and choose another theme (I would suggest Material Light > Material.Light.DarkActionBar
Please see the image below:

Android: How to create options menu outside action/tool bar

I need help on how I would make an options menu outside of toolbar. The one with the dropdown like the options menu in chrome or messaging, not the contextual which pops up like an alert/progress dialog.
I am planning to use it beside a textview, not on a toolbar. I get the idea of having to create an xml for the menu, but what do I use on the layout and how do I inflate it?
How to add menu button without action bar?
those are two pretty acceptable solutions, doubt there is any other workaround...or just use a spinner

Android - Main menu for simple app

I'm making a simple android app, and I'm trying to work out the best way to make the main menu. The users of this app are not likely to be that sophisticated, so I want to make it as simple as possible.
So I want the first screen they see when the app opens to be this menu - they click on what they want, and it takes them to that part of the app (Not pressing a "Menu" button to bring it across from the left, which is common nowdays).
So, I want the menu to look a bit like this: http://cloud.addictivetips.com/wp-content/uploads/2012/10/AppZapp-Android-Menu.jpg , minus the search box, and the strip down the right hand side. (also this looks like it is one of those menus that slide out from the left, which I dont want)
I have had a look into menus (https://developer.android.com/guide/topics/ui/menus.html#options-menu), but it seems it is more used for contextual stuff, or letting the user select an option), then a navigation menu.
So - what is the best way to do this? Do I just create a list and put a button in each item?
Based on the your requirement , Use Navigation drawer see the below link.
Navigation drawer tutorial
NavigationDrawerSample
After used navigation drawer, you need to add search view on navigation header.For more info see the link
SearchView tutorial

Android app: 2 problems with layout

After ionic and angular i'm trying to develop apps in native java. After setting up a toolbar and a drawer-menu i wasn't able to make it work:
First problem: How can i use myitems in my drawer to show different views (in separate .xml files) in the main view.
Second problem: How can i create a view, similar to a full-height snackbar, whitin a text input field?
thank you for your time.
You should use fragment replacement. So in your main activity layout file create Frame Layout and onNavigationDrawerClick change fragments. Take a look at this as example.
2.I recommend you to use Bottom Sheet in it. Sample
If you need some code recommendations comment here. Good luck

Trying to develop a sliding drawer type View in android?

I am working on an app which requires me to make a layout something like this:
Here you could see a black button like view at the right bottom . I want this button to work as a sliding drawer type view.
when I drag this button this would happen:
How could I implement this .Please someone help me with this .
Where could I start from (Please give some link to source or example)?
i cant see ur images so edit ur link and try this one. http://blog.sephiroth.it/2011/03/29/widget-slidingdrawer-top-to-bottom/
I've implemented my own drawer after reading this very good article :
http://w2davids.wordpress.com/android-damn-that-sliding-drawer/
Good luck.

Categories

Resources