开发者

Android Resource for Survey App design

I am开发者_Go百科 creating a survey app for android. If I have 50 questions do I create 50 activities and 50 XMLs for each question or there is a better way to do it? I'd appreciate if someone could direct me to a good resource for this problem. How can I ask selected questions based on answers or design skip patterns? Thanks.


No, you want to design as few activities as possible and make then reusable. I would suggest you identify all the potential TYPES of survey questions and then design one activity for each question type. Then when you present a question on the device you load the appropriate activity type and populate it with appropriate data.

If you are new to Android I'd suggest you start out with an introductory Android book and work through the first few chapters until you feel comfortable with loading activities and populating them with information.


No - You shouldn't need to create 50 activities & 50 xml files for the layouts. Just create a Question Activity and a question.xml layout file and dynamically populate with your questions and answer interfaces.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜