开发者

Iterating over a collection with an Activity for interacting with the properties of the objects

How would I iterate over a collection with a different Activity to interact with ea开发者_JAVA百科ch object within the collection?

For example if I have a survey collection (List maybe) full of question groups and questions, how would I have an Activity/layout for each question group and question given the fact that the questions within the collections are dynamically loaded?


You can use Activity.startActivityForResult(..) to start up the Intent and specify that you expect it to return something. To exit the Intents, just call finish().


It's not clear to me what your objective is, but you could put each question into a ListActivity, and use onItemClicked to launch the per-question activity when a user clicks on it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜