Detail screen for item list item: new or same job?

I have a listview where each element corresponds to an instance of the element in the array. When the user selects an item, he displays the Details page, which reads and displays the other data items of the list item.

Will it be better implemented on the Details page in the form of his own action or a new presentation within the same activity? Pros and cons of each?

The new action makes my work easier in terms of processing the back button, but then I have a problem how to transfer the rest of the data structure of the new activity, since I cannot bind it (unless I serialize it).

****** EDIT **** Essentially I have a playlist in which the list item shows the name, position number and icon. Clicking on an element, you will see a full screen description of the element. I tend to hide this in the activity of playlists, since all this data is contained there.

+4
source share
3 answers

Depends on how you want it, I recommend using a new action for things with lots of information; especially if yoy requires some interactivity, like links.

Pro with this is basically an application thread. the user can use the back button to facilitate navigation.

Con to have a completely new look for viewing details

If, however, you simply expand the description, you can use the dialog.

0
source

It depends on whether you want to be able to call this element from another place, and then break it down into a separate action - this is the way to go. As for how to get the data there, why not just pass the Intent with the item id, and then load it from your identifier-based data store.

0
source

but then I have a problem with how I pass the rest of the structure data to a new activity, since I cannot bind it (unless I serialize it).

Or move the model beyond the initial Activity . For example, you can save the list in the Service to which the Activity bound and manage them. Or, let the model be stored in static data members (although don't forget about the problems with the GC). Or, if in the end it will be in the database, go to the database now, and then just pass the key to the element through an additional one, so the activity of the part can get it from the database.

0
source

Source: https://habr.com/ru/post/1309157/


All Articles