Android popup with checkboxes - android

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.

Related

Add "menu" on every listview item

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

android 4.0 - How to get bottom menu button using theme black?

I am trying to create an android app that has the following:
Theme set to #android:style/Theme.Black
Bottom options menu button on all activities except for one.
I am trying to remove the bottom menu button from the activity that I do not want it to appear on by returning false in the OnCreateOptionsMenu method. This doesn't work...
So if I compile my app to target sdk version 14 the menu is gone from every activity...
How can I achieve this?
Assuming you are thinking of the standard Android MENU button, this cannot be removed. Keep in mind that on many older phones, this is a hardware (physical) button.
I recommend reading the advice I received in the following link, regarding the MENU button and the various issues pertaining to the changes from earlier version of Android to ICS.
Handling the missing MENU button in new versions of Android (3.x and up)
Also, I would pay attention to the following official info from Google, and strongly considering rebuilding the app to not be dependent on the MENU button.
http://android-developers.blogspot.no/2012/01/say-goodbye-to-menu-button.html
Not only should your apps stop relying on the hardware Menu button, but you should stop thinking about your activities using a “menu button” at all.

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>

Existing library for quick menu like in Google+ app?

A design pattern I've noticed being used recently in some Android apps is a simple textual list menu similar to QuickActions in that it pops up in a speech-bubble-like View when summoned. The Google+ app uses it for overflow items, for example.
Does anybody know of a library that'll let me easily implement these kinds of menus in my own app or, if not, what the most straightforward way of doing it from scratch would be?
Many thanks.
It is not a standard widget, but you can use: QuickAction dialog. Or you wan't something else?

Categories

Resources