multiselect spinner without a dialog - android

I have a requirement where i have to implement a multiple - select spinner in android.
I want a normal spinner( which appears as a drop down) with check boxes for multiple - select option. The selected options should appear as comma separated values after selection.
I don't want a dialog to pop up when i select a spinner.I want spinner as a drop down.
I have gone through many example in the net, all examples pop up a dialog with check boxes or radio buttons for multiple select option.
Can anyone please help me with this.
Is it possible to do?

I think your best bet would be to inflate a Popup Window at the position of your text.
In that popup window you could have checkboxes for multiple select option.

Related

How to show built-in horizontal edit menu on custom EditText view

Is it possible to easily show a simple menu, similar to this one in a screenshot from Chrome? I want a menu to show when there is a selection to manipulate to allow the user to Slect All, Cut, Copy, Paste.
Is this a standard control or something that should be easy to get working? What is the name of this control. This control is not showing automatically for our custom EditText view, which is fully functional in every other way.
Will I have to create my own custom control and display it in the correct location, manually? I have done similar work for an equivalent custom control in iOS, where the menu I want is called an Edit Menu, and it is trivial to show and hide that menu.

how do display the another set of menu-items by selecting particular menu from menu list?

In my application I am having 3 menu like options,setting and favorites. In that If I press 'favorites' means it should display another set of (new)menu and I want to hide the previous set of (old)menu. IS it possible with android? If anyone knows, help me please.
I'm not sure if this is possible, but it's not the bast idea to do such things. Main reason - this behavior will be unexpected for user.
On selecting option menu item you should show alert dialog with possible choices.
Offtopic: According new design guidelines Android will delete "menu button", and all actions will appear on action bar. May be this will be better for your purposes.

Android TextView show just above the Menu

i have a textview at the bottom of my screen but when menu clicked, i need to move the textview just above the menu, so that every one can see the textview,now when i clicked menu ,it cover the textview ,any solution for this problem
This is only possible with the virtual keyboard, I think.
It would not be a good idea anyway, since menus are for things the user can decide to do without looking at the screen information. Menus should be self-explaining.
A dialog is another story, since it sometimes refers to items, which are covered by it (open file e.g.). One might want to repeat the item in the dialog. I would not use a menu to open a file, the user has selected from a view. Instead, I would use a popup dialog, repeating the file name.

What is the best practice for opening a context-menu-like menu from a short button click?

I have a button that says "Sort" and when a user normal/short presses the button, I want a menu to appear with the various sort options. Looking around online there doesn't seem to be a straight forward answer to which route is considered best practice. I'm looking to have a menu that looks similar to this:
with icons and text.
For an example, click the Layers button in the Google Maps app. It opens a list of options on a single short click. It has a title at the top and icons for each option. (The icons aren't super crucial)
Should I use a Context Menu? If so, how do I do it without a long press. Should it be a Spinner? If so how do I change the appearance to use a button instead of the normal drop down box.
Spinners are for stateful selection, which sounds like what you want here. The user will select one sort option from a list, and there is a concept of a "current" sort that stays visible to the user.
For something like the activity picker in your screenshot, Falmarri's suggestion of an AlertDialog is reasonable. The difference between choosing a sort and the activity picker is the "stateful selection" distinction. Spinners have a concept of a currently selected item already provided for you, dialogs are more general.
http://developer.android.com/reference/android/app/AlertDialog.html

How to grey out spinner in Android?

I use two Spinner in my App. One of them is initially disabled because I need the user to select something in the first spinner to load the content of the second one.
I would like to change the design of the second spinner to show the user that the spinner is not active, eg. grey the spinner out. How can I achieve this?
If this is not possible how would you change this dialog to make it clear to the user that she has to select something in the first spinner?
The Spinner doesn't gray out when disabled, it's a bug that we fixed in FroYo (next version of Android.)
Further to setting as disabled, I don't know any other way to grey out.
Hide the second spinner until the first has no selection.
Or until it's in disabled state, the first visible option should show text related to the required selection eg: Select a Continent first

Categories

Resources