How do we show the options bar options vertically in android - android

I am using two option menus in my Layout. I am opening them with different button clicks using
openOptionsMenu();
I have 5 items in my options menu, when i call it, it pops up in Grid. ( table like click ) I want them vertically one on another, what should i do?

Got my problem solved from here http://www.codeproject.com/Articles/173121/Android-Menus-My-Way
Download the source code for complete understanding. cheers :)

Related

I have trouble figuring out how to come up with a menu like this one on Truedialer

I am developing an app where I have several items in a list and I want to show a menu like in truedialer whereby it pull from the bottom of the screen but does not fill. When I drag it upwards it can still fill the screen..
I have the menu items in an stand alone activity.
Can Someone help me figure out how o have to activity with the menus behave like the one of truedialer as shown in the screen
enter image description here
enter image description here
You can achieve this by using bottom sheets
https://material.google.com/components/bottom-sheets.html
http://android-developers.blogspot.com/2016/02/android-support-library-232.html

swiping view or layout in android

I'm trying to make an extra effect to menu that will come down from the top of the screen
I want to make it enter the screen while swiping it from the top and if the user left it, it should continue to the end
this is the figure that demonstrate what I want to do:
I tried to do it with animation but the animation will not go on while swiping and it will go to the end without touching
any other ideas to move the view down with finger ?
Check this out for a sliding Drawer http://developer.android.com/reference/android/widget/SlidingDrawer.html
it sound like you kind of want the same thing as the pulldown menu at the top of all android phones except you want it customized, the link will show you that.
OK
It works for me now
I used SlidingTray.java class from this API
API Website
btw : this api open source

How can I make a button act like a menu?

I am working on a simple application that is supposed to work on 800x480 tablet. Currently:
[][][][]
[][][][]
OOO
These are all buttons and they are working as expected. I, however, need to add menu items to the bottom-buttons. When clicked, menu items should pop up.
-Can I create a menu and place it at the bottom of the screen to replace those buttons? If so, could you show an example, cause I couldn't find any.
-Or, can I add menu items to these buttons?
What You want is an OptionsMenu, if I understand You the right way. I could give You an example later, I am not at home. But for now, look at this example. If You follow this, You donĀ“t need those buttons at the bottom.
http://www.edumobile.org/android/android-beginner-tutorials/options-menu/
if it is not clear, just let me know and I try to give You an example at the evening...
EDIT
for custom menu, You could use PopUpMenu. I had not tried this for now, but I think it is a good solution
http://android-er.blogspot.de/2012/03/example-of-using-popupmenu.html

Menu that appears from above and below hides and shows on screen touch in android without using the menu button

Is it possible to create a menu in android that shows when someone for example touches a graph and It brings more options. I want a menu that will appear from above and below like how the menu used to be in android when you touch the menu button. Now without the button i would like the user to touch a chart or a table and two menus appear from above and below or even sides. Any suggestions will highly be appreciated
Suggestion:
Make the layout of menu you would like to show, and include it in the layout of your activity.
By default set it to be GONE, this will hide it.
Then set a touch listener for your graph, and change the visibility of menu to VISIBLE to show it.
I think what u need is a context menu; see this example Hope this helps :) cheers :)

android : set the menu out / visible

Maybe this question has been asked already but I can't find any information about that even in the "Menu" section of Android's doc...
So does anyone know if there is a way to set the menu out on an activity (to avoid the user clicking on the menu button of the phone)...?
Is this what you are looking for Sephy ?
Activity.openOptionsMenu()
I'm not quite sure what you are asking. The menu button is often a physical button on the phone, so you can't make it invisible if that is what you are asking. You can refrain from adding items to the menu. Then clicking the menu wouldn't do anything.

Categories

Resources