Add "menu" on every listview item - android

I'm developing this app, which has a listview in it, but I want to add the "three-dot" icon in the corner, and when you press it, an awesome menu will popup. Like this in the Google Play app: http://imgur.com/a/cGb2Q
I've seen many apps that have it, so it could'nt be that hard? I have googled a lot, but to be honest, I don't know really what I should google on. This must probably be the shortest & dumbest question on Stackoverflow, but I didn't really know what my other options was.
I have a thought that it may just be an spinner that somehow is hidden and when you press the three-dot icon it'll just pop up in an awesome way, or is this implemented in the Android SDK?

I don't know how they do it or if this is the best way but you could create the overflow icon (3 dots) and use a PopupMenu for this. This was added in API 11 so it wouldn't work on older versions but if you are targeting API >= 11 then I think this would be a good option for you. I use it in a custom "actionbar".
If this isn't awesome enough for you then you can also use PopupWindow which has been around since API 1
PopupMenu
PopupWindow

I believe what you are looking for is a Popup Menu

Related

Android fill part of screen with menu

I am developing an app for Android, and would like to have a menu button in the top left corner, above a webview. When this button is pressed, I want a menu filling almost the entire screen to slide in from the side, as in Evernote's android app. How is this most easily achieved?
I have googled quite a bit without finding an answer, all help is appreciated.
There are many different libraries you could use to implement a sliding menu like this. I'm currently using this library which is very easy to implement. It also uses ActionBarSherlock which is included.
The menu is probably programmed using ActionbarSherlock and the transition between activities is explained here:
Duplicate
Without any code this is all we can do for you. Hope this might help.

Android popup with checkboxes

In my app I would like to have something quite similar to Android's built in popup menu (see link below), but it also needs to include checkboxes and images and I should be able to choose several checkboxes before closing (with the same button that opened it). Is it possible to do that with android popup menu? Is there a better way? Any chance there is a way to do it on android 2.1 (this the version on my demonstration device)?
Thanks for your time,
Lior
You can use the overflow menu in Android 3+. But there is a way to use it in lower APIs by just using ActionBar Sherlock. See the demo App of the ABS. There is also a demonstation of it.
It should look something like this.

android pop up menus

I cannot find either one of these two views in the source, but have seen them both in many apps. Can anyone please tell me what they are called?
Thanks
The second one is an options menu from the action bar. I think it is implemented as a ListPopupWindow.
The first one is not part of the Android SDK, though there are various implementations floating around. Here is an example of one designed for use with Google Maps, for example. Here is one designed for the "quick actions" pattern.
I'm going to assume that they're custom made ones, so you won't find them in the standard Android libraries.
The second one I think is just the way that the default menu looks in ICS (and honeycomb for that matter). If you build for 4.0 and include the code for an options menu I think you'll get that UI by default. If you are looking to customize it check out this page http://developer.android.com/guide/topics/ui/actionbar.html and pay close attention to the "Adding drop down navigation" section.
The first one is not a part of the android UI, that is something specific to the facebook app.

Proper user experience for ActionBar on phones with Menu buttons?

I have an app that's built for Android 2.2, so I'm not using the 3.0+ built-in ActionBar class but rather building my own custom ActionBar implementation using Google's older UI recommendation that was introduced a couple of years ago.
All of my screens have between 1 and 3 actions that can be performed, so they all fit very nicely into the ActionBar UI (which Google recommends has a maximum of three buttons). The problem now is that none of my screens have a regular options menu and so they do nothing when the user presses the hardware Menu button.
According to Google's interface guidelines, this is correct behavior. If your activity doesn't have an options menu then it should do nothing when the Menu button is pressed. I've found during user testing, however, that users are quite perplexed when they press Menu and nothing happens (and every single user has tried, usually multiple times). They say that they appreciate the actions being exposed on the screen through the ActionBar, but at the same time they want the Menu button to do something.
I've been looking at Google's first party apps and it looks like they just always have enough options available to be able to load up the options menu with stuff after the ActionBar is full. Google+ seems to use the Menu button in the traditional way for overflow options on phones that have one, and they show a dropdown menu in the ActionBar for phones that don't. That would work if I had more than three actions but I currently don't.
It seems that the only way to meet my user's expectations is to put some junk options that have no value into the Options Menu just so that something happens when they push the button. I really don't want to do that. Does anybody know of a good way to deal with this problem? Should I just leave the menu button alone and expect people to figure out that it doesn't do anything?
I think it's safe to assume that most users don't know the menu button exists and having all of the actionable items displayed on screen is best. User testing by Google has revealed this and it is why they have chosen to eliminate the menu and go with the built-in action bar starting with Android 3.0 and culminating in the recent 4.0 release.
Something to think about would be added a single "About" item to the pre-3.0 options menu/post-3.0 overflow menu. This could just popup a dialog with simple info about the application (e.g., version, licensing, link to website, author, etc.). This way there is something there should they happen to press the menu button but it is not required in order to properly use each activity to its fullest potential.
I have an app that's built for Android 2.2, so I'm not using the 3.0+ built-in ActionBar class but rather building my own custom ActionBar implementation using Google's older UI recommendation that was introduced a couple of years ago.
As an author of an action bar library this sentence disturbs me. It's fairly trivial to use a custom action bar implementation on pre-3.0 and the native one post-3.0. Take a look at Google's Action Bar Compat sample.
...or, you know, you could also go with a library like ActionBarSherlock that does this for you! </shamelessPlug>

How can I create a slide out options menu for Android ListView items?

I am making an Android app and one of the activities in the app is a List Activity. I want the ListView to have the slide out options menu for the list items like you often see in apps like twitter:
I thought I read a while back that Android had a feature like this included in the sdk, but I can't seem to find any documentation or tutorials on it. Part of my problem is that I don't know exactly what the feature is called. I have done quite a bit of searching, but I haven't come up with anything useful. I am hoping that someone with a bit of Android development experience has seen this before and could recommend a resource or two.
Thanks!
This question has been asked before. They're called quick actions.

Categories

Resources