What is Android's concept of deleting a list item? I thought of something like long-pressing it which will pop-up a dialog box to confirm / reject...
But would like to know what is the most popular way of doing it in Android.
Thanks!
This question is regarding to UX design. Generally speaking, the most popular approach of deleting items are:
Long press and pop up context menu
On action bar, entering selection mode and then choose the action
Slide to right/left and display a delete indicator on the item
You might choose/combine appropriate methods.
I have found this link may explain everything you need for the deletion in list view.
https://ux.stackexchange.com/questions/48112/typical-android-app-behavior-for-deleting-data-from-a-list
Related
It probably will be an opinion based answers rather than fixed ones, but I thoughts it wouldn't be bad to ask this question and get opinions from more experienced developers.
I am implementing in my app recycler view, that each item in the recycler view should have some actions, for example
delete, reminders, spinners, change icons and some others.
Currently I implemented the delete and change icon logic with both swipe action, and contextual action mode(on click the app bar changed to "new" app bar with delete button)
I thought to continue to implement all the other actions, like reminders and spinners in the item itself but I don't know if it's a good idea.
After some research I have several approaches in my mind:
throw all the actions right in the item view itself, which mean the user see right away all the possible actions.
use popup menu(three dots on the item, and open little menu with actions)
expand the contextual action mode that will include all actions
Maybe even completely different approach and put all the actions inside the item detail screen
What do you think is a better approach?
For what it's worth, the Material Design specs (scroll down to List Controls, I can't get a link to it HOW IRONIC) recommend a primary and (optional) secondary action, with possible left and right swipe gestures (which are usually understood to be "get rid of this item" in some way, like archive and delete)
Personally I think that's a good way to go (and you don't need to follow MD but it's a good base set of principles, especially if you're not a designer or UX person yourself) - it avoids clutter, and makes it clearer to users what their main options are.
You can implement tap behaviour on the list item to bring up a dialog (fullscreen or otherwise) where you have room to add lots of other options, labels to explain them, etc. You're not limited to the size of a list item, and you can easily add to it in future if you need to, instead of being committed to trying to fit everything into a list item.
Plus there's accessibility to think about - list items are small, you don't get much space (especially on smaller devices, where the user has large fonts enabled) so where are you gonna put all that stuff? Moving some to a contextual action mode works, but there's not much space there either, and the user has to realise they need to look up there. Will it work well for blind users relying on linear navigation?
Basically you can avoid a lot of these troubles by following established patterns, where other people have done the work to make it all "just work". My own personal experience has been trying to do things in a different way, and eventually coming back to the "recommended" way and wishing I'd done that to begin with!
I have a listview that is working fine. Now I have one option to enable and that is deleting the row. I know this is not a problem But Want to take some suggestions. and that is what is a best way of deleting the item(row). Here what I have tries I am sharing with you
Used Context Menu on long click but they do not look cool and quite old.
Used Swipe to Delete but there comes some problems which are not working good, I mean there are some problems in it. here is the reference of my question about that.
Can any one please come up with some suggestion of deleting the row which are new and good ways to do so.
What are prerequisites :
I am using fragments with one single activity and using tool bar so I really can use delete option appearing in toolbar for only one fragment . Actually I do not know how to do it.
So please tell me what are the good and best way which are user friendly , looks good in gui and also a Beginner developer friendly
One solution is,
Add hidden checkbox in each listview row.
Add delete button on the toolbar/actionbar.
OnClicking delete button show checkboxes to select multiple items to
delete.
Again clicking on delete should ask confirmation dialog and delete if user agrees.
You can use Recyclerview instead of ListView. It has default animation while adding/removing items. You can check the code here or you can provide cross icon in the item and delete on click of it.
I need help as I am a bit stuck.
I want to know what is the best method to implement for what I want in my app. I want the user to be able to click on an image in a page, and a popup menu appears. The user would have a selction of 5 items, and they would be able to click on one of them and the app would go to the selected menut item/page.
I have a popup Menu that works, but I am not able to style it. I have asked about it, but the answers seem to be that it is not possible to do so.
I have also implemented a PopupWindow, but although the items appear as a list, it is not possible to select them.
Would someone advice me as to what is the best to implement?
Thanks very much. I can post both sets of code: for PopupMenu and PopupWindow, if that helps.
When there's more than 6 items in the Android Option Menu, a "More" will be in place. My question is currently I see two different behaviors upon clicking, from different apps. One will show a menu like this, another will show a context menu like this.
Which is one is the proper Android way?
Thanks
I don't see how those two are related. Your first link shows the options menu with "more", which is what you were talking about in your first sentence. The second link shows the context menu after a long press on a list item - that's a completely different item. They both have their uses.
The menu is used for options that are global to the current activity. The context menu is intended for options that relate to the specific item you picked.
If you see an app that uses a context menu for "more", then it's not using the normal Android menu system. I've even seen Google apps use that (Maps, I believe), and I don't know why you would do that.
The first is the "proper" way as in the default behaviour you get. I don't think the difference is meaningful, but to achieve the second the coder must have mucked around, and I don't think it's worth it..
I want to create a custom OptionsMenu in my application. The default OptionsMenu display only three items in one row. Now i want to display five to six items having only icons. Also i want to change the background color of the OptionsMenu but not getting the appropriate way of doing this. If it is possible then please let me know about it.
Short answer
As an user it bothers me when the application changes my android's widgets. I wouldn't recommend changing that and android doesn't provide a way to do it.
Long answer
Even though Android doesn't provide a way to customize that you can always handle the key event and show a view from your own. Similar discussion in stackoverflow.