Pergunta

I need some way to edit an item in my multi-line ListView - and it's just two text fields that need editing.

What would be the best way, design-wise, go about this? I feel that a whole new activity would waste too much screen space and look off, yet just a popup with the two fields and some confirm button might look off as well.

Foi útil?

Solução

It's pretty subjective as to what's the best design for this, especially without knowing more about your specific use, however there are definitely a few possibilities that come to mind.

The new activity option that you noted is actually quite standard. You can see a similar paradigm used in Gmail, Google Talk, Messaging, etc. If your text fields expect to have something like a single word in each though, I can understand how that might feel like a waste of space to create a new activity. I wouldn't necessarily rule it out though; you can probably play around with styling to make it feel less empty (include labels, short descriptions, etc.). Also consider that most users nowadays have soft keyboards. That can take up a significant amount of space and make the view feel less empty.

The popup option seems less standard, but again if you styled it correctly I could see it working OK. What don't you like about this option?

Another option is to do a multi-pane layout of sorts which is far less common for a phone-sized layout but not out of the question. You could have a pane with two text boxes which is for the current item above your list view and have the contents change when you select an item in the list view. This is also a less standard UI.

You could also have an alternate view actually within the list item. In addition to your current (I'm assuming) two TextViews, you could have two EditTexts and maybe an OK and cancel button that are hidden. The visibility of all of these views would be toggled when you select the item.

There are more options too, I'm sure, but hopefully this will give you a little to think about at least.

Outras dicas

I would use a separate activity for several reasons:

1) It's what users would expect. I can't recall any apps that use a pop up to edit contents of a listview

2) It'll be much easier to manage state in a separate activity e.g. when a user starts to enter some text and then gets interrupted by a call or email notification etc

3) If you're editing text then the keyboard wil take up most of the screen so you're activity won't look sparse.

you need to update in list view and add more items in list view???????

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top