On Mon, Apr 26, 2010 at 2:35 PM, John Smith <[email protected]> wrote:

> So, my problem is I have multiple questions, one to be presented each time,
> and I need to wait for one to be responded so I can ask the next one. How do
> I accomplish this?


I would not use Dialogs for this.

One thing you could do is set up a "Questionnaire" activity with the
appropriate elements (a textview that will hold the question, a list view
with the response options, and a "next" button).

You could create an object that represents a question that has the actual
question (string), list of responses (strings), and whether its single or
multi-selection.

In your activity you could initialize the set of questions you want to ask
(from a database or something) and present the user with the first question
in the list, which is simply a matter of populating the views in the
activity with the question's properties and setting up the list view to be
single or multi-selection and filled with the response options.

You could validate to make sure something was selected before allowing the
user to move on to the next question. When they hit the "next" button, you
simply refresh the views with the next question, or show a "completed"
screen once there are no more questions and allow them to exit the activity.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
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

Reply via email to