I am new to Android, and am trying to develop an app that presents a list of choices with a textfield next to each that allows the user to enter in quantity information related to each item.
What would be the best way to impliment this? Currently my app is using a buttonlist with checkboxes next to each item to select it. I'd like to expand this so that I can select multiples of the same item.
Any help is appreciated.
Thanks,
Jason
I'd use a Spinner for the item and an EditText for the quantity.
Related
Am new to development and have doubt in selecting listview items using android.
I have an listview with list of data from mysql and also have checkbox for selecting items and have button to pass the selected items to next screen.
What i want to know is how to select multiple items and send to next activity using the button.
Awaiting for your kind reply.
Perfect tutorial for your problem, might it will help you
ANDROID: MULTIPLE SELECTION LISTVIEW
enter code hereIn my android application , there is a populated tableview with favorite products. There is a delete functionality to delete products from the list. How can i show this to user that he can delete products? like in ios there is a method called commiteditingstyle.
What are the options in pure android way to edit tablerows
longclicklistener and show a delete button on table row
show a checkbox on edit button
any other
That's really just up to your imagination. I think typical android UI would just use the flick to remove, but some like the longpress or a button, some use an "Edit List" option which adds a checkbox next to each item on the list and then gives the user an option to delete selected items(best for managing large list or batch quantities).
Hope that helps! Good Luck!
I am just thinking to create like below in spinner, but i am not sure how to make it work
Fruits (heading unclickable)
Apple
Mango
Orange
Cars (heading unclickable)
BMW
Lenova
Is that possible in Spinner or if you know any other method to create like this, then it would be great.
I am getting those details from the local database. Heading from one table and records from one table.
I am looking for any example or solution.
Thanks for your help guys.
After long time i found a way to do this. I achieved by combining a Button and Expandable ListView. What i have done is i created a button like spinner. OnClick I launched a popup Activity with Expandable list view in it by calling startActivityForResult() which returns the selected value. Finally i replaced the button text with the selected value.
If you looking for Expandable ListView Tutorial you can click below link.
(http://androidtrainningcenter.blogspot.co.uk/2012/07/android-expandable-listview-simple.html).
Take a look at the Spinner example in the Hello Views tutorial. They accomplish this by using a TextView for the heading, and the spinner for the selectable list of options.
I am working on a UI where I have a list view. Each row has 2 information. One is Product name and the other is product ID stacked one over other. So each row has 2 lines of data.
What i want to do with this:
Once a user clicks on each row, it will further expand and show one input and one spinner. So it is basically for putting in Quantity and unit of measure.
Please let me know if this is achievable and if I can refer to some example.
What I need is more like
Taskos To Do List | Task List
https://play.google.com/store/apps/details?id=com.taskos&hl=en
All i need is that the category will not be expandable. Only the items will be expandable. All i need is an example of such app and then I can take it forward.
I think it could be done... you would need to put the extra widgets in your row layout, populate them and hide them upon list creation, then in your onListItemCLick you could unhide them.
Note I have no idea if this would work, but it seems reasonable that it might and it's what I would try and do to achieve the goal.
listView cannot be expanded. however you can use an expandablelistView
But the kind of functionality you want cannot be done this way(I guess.).
You can use
registerForContextMenu("your list View");
to register your list view
onCreateContextMenu
for the kind of action you want to be performed in your case its dialog with EditText and Spinner to have input from user
I have a spinner that acts like a filter for searching among several categories. But the problem is that the spinner allows only one category to select from. Is there a way to obtain a multiple selection behavior for the spinner, or what other alternatives exists?
S spinner is designed to show one item at a time. You might get away by making a spinner of checkboxes, but it will be probably an awful user experience.
I would suggest you a ListView instead and CHOICE_MODE_MULTIPLE. You can add a listview to a dialog as shown in this answer: is it possible to create listview inside dialog?
Android provides Spinner widget which has functionality similar to drop-down list. But Spinner accepts single selection. so we select only one item at a time.so We can achieve multi-select feature using a custom Pop-up Window with a multi-select list.
Pop-up window is similar to Dialogs except that a pop-up window can be positioned.
When the drop-down button is clicked a list will be displayed(as drop-down), then you can select multiple values. The selected values will be displayed in a Text box above the list.
for reference you can prefer this link:
http://asnehal.wordpress.com/2012/04/03/multi-select-drop-down-list-in-android/