I'm trying to cope with some problem in finding good idea. I would like to make interesting menu like in games on Android (eg. ANngry Birds or here: http://www.youtube.com/watch?v=Q3g6SdTODY4) In this panda game I supose that first menu are simply 3 color buttons, but what about this sliding menu later with stages description - this same as in angry birds? Telling the truth I have got no idea what object it can be?
I will be glad if someone can tell me that. Or the best to give some tutorials about it. I cant google any.
Well, it seems that this sliding stage description is implemented with some simple layout placed to HorizontalScrollView and some animation applied to the buttons.
It can be your custom view provided with your translation animations and handling its visibility on the click of the default menu button (via onKeyDown()) on Android.
There are similar questions:
Custom options menu in Android
Android: customize application's menu (e.g background color)
Related
i am working on demo application.
have you any idea about popup menu in Android 2.1 version. actually working fine in android api level 11 and above..
reference url : http://www.sitepoint.com/build-intuitive-extensible-menus-in-android-with-java-and-xml-2/
yes, you can do this. you just need a little bit of Animation and its done. :) It will give the exact feeling like a pop-up menu. I have done this before.
you need to use Relative layout for this purpose, because they can overlap on each other.
On click event of button, you need to show the View (relative layout holding a custom menu in this case) with an animation say bounce animation. again click on same button will hide the view again with an animation.
I wish I could post the code here but I have to search where I put my project. :P ;)
I hope it will give a little idea about a totally customized pop-up menu.
I would like to create a contextual menu for a listview similar to the one used by the google play music app in the listviews. (see screenshot. The triangle buttons open the menu for the album. and then one can select different options depending on the selected item.) But I've also seen this element in other apps.
https://lh5.ggpht.com/IvSpTcmdyUOC9GoX-x528xAzy9jEPjWCLcNcru4CBEcUNZ-YHo0y2TQHcGmuvOQ2zg
The Problem is that I neither know how to implement the triangle button correctly (is that just a normal imagebutton?) nor do I know how to open that popup window for each entry.
One approach I tried was using a spinner. But the problem is that the spinner always was as wide as the longest element in it and not just the triangle. Otherwise this would be a good solution. Is there a way to set the spinner to a smaller size and hide the horizontal line beneath it?
Or would a spinner be the complete wrong approach and I should solve this problem differently?
You should be using a Button or an ImageButton to trigger the PopupMenu. You could use Android Holo Colors to create the background image. Alternatively the Holo default spinner background should do the trick, too.
When the Button is clicked you should trigger a PopupMenu. The Android PopupMenu is for Android SDK API 11+. So if you're about to support lower versions you should consider external libraries like HoloEverywhere.
The Spinner Widget is not suitable for your purpose.
I have not really used the Music app before, but I would try to answer the question from what I understand from the screenshot. It seems to me that options that come up are presented in a simple Dialog. This dialog has a list that can be easily implemented as given here.
SO, what you can do is include a Button, or ImageView, or ImageButton or any other View in the list item and clicking on that will display the dialog.
I am in the process of replacing the Android Popup Menu with a Solid bar containing the buttons at the top of the screen. Now diffident activities contain the same buttons , plus to enhance the user experience we are keeping the Menu Bar with the button. Now i want to make this generic enough. Does anyone know of any good UI Patterns that will help me achieve this. I dont want to copy and paste my layouts xml code, plus the onClick listeners have the same code across the activities. Any help will be appreciated.
Kind Regards,
Mateen.
Use the ActionBar and the Compatibility Package.
I have googled this, most of the solutions are using:
1.TabHost with customized style which would cover the separate line between each tab to archive the requirement.
2.On the android developers website, there is a article is using Merge layout to put 2 buttons on top of the background image kind of archive what I want.(http://developer.android.com/resources/articles/layout-tricks-merge.html)
3.What about using button but style the looking like the example below? I don't need the selection, cause each item in the menu will be a button, which takes the user to another page.
I am wondering is there any other solutions apart from these two?
This is something want:
I don't need the menu likes a tab which has selected and unselected, they are better like a button always displaying in certain screen(activity).
Thank you.
You can use simple buttons, and provide any custom background for it. For such simple form as on your screenshot look for this link.
But #Janne write right thing - you should be very careful with transplanting controls from another platforms.
I've been using firefox for Android and really like the use of the sidebar to hold shortcut icons and the like. How would I go about creating a similar bar myself with the following attributes:
progressively revealed as I swipe in one direction
progressively hides as I swipe in the other direction
can be a custom width
I can dynamically inject layout in to it or it can hold static content
Is there any open source code available? If not, what approach would I use to create this?
Sound like you're describing a Gallery control. There are some examples in the ApiDemos project here.
The first part can be solved by using a ListView. The second part I don't know yet. I'm looking for such a component as well.