Thanks guy. What I am thinking is #1 has very clear and clean coding style, each question stands their own activity and screen. #2 needs one "super" activity to take care of everything.
If you were me, which way you will go? On Mar 11, 6:05 pm, usher <[email protected]> wrote: > Hi friend, I am trying to implement a questionnaire on android, and I > have two solutions, but I am not sure which one is better, please > advise. > > Basically I need display these 10 questions to user, on the bottom of > each question, it will display Next and Previous button. There 10 > questions are coming from server, so I will have to create part of UI > dynamically. > > Here are two solutions: > > 1. Create a Question activity, then make 10 instances of this > activity. > The problem for this one is, when we click Previous, we have to > finish() current question activity, and recreate new instance for > current question when we click Next from that "Previous question". > In this case, we are creating so many instances.... > > 2. Create one Question activity, put ViewFlipper into this activity > layout, which will be used to mimic Next and Previous action. > > Which way is better? Any idea? Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

