开发者

Showing detail from a ListView

What is the correct way of showing a new View with more detailed information from a ListView in Android? It's a topic that I can't find a solid answer for in eith开发者_如何学Goer of these Android books.

For example a list of contact names, one is selected and a view shows their full details.

Do I launch a new activity for this or use a ViewFlipper?


Your approach is right. It's the recommended one. When designing an activity, it's suggested to use this paradigm:

One activity = one thing to do.

  • Viewing the list
  • Viewing the details

On the Notepad tutorial app, a new activity is launched to view the details of a list item.

Anyway, the ViewFlipper is another possible approach that keeps all the content in a single activity. This approach is suitable if you manage the Back key correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜