简体   繁体   English

如何制作一个简单的安卓测验应用程序?

[英]How to make a simple android quiz app?

The first screen of the app should have 2 buttons, the first button displays "Easy" and the second displays "Hard" - this is where the user is choosing the difficulty level.应用程序的第一个屏幕应该有 2 个按钮,第一个按钮显示“Easy”,第二个按钮显示“Hard”——这是用户选择难度级别的地方。

If the user pressed on the button that displays "Easy", is gonna have to answer 5 random questions and if he pressed the button that displays "Hard", is gonna have to answer 10 random questions.如果用户按下显示“Easy”的按钮,则必须回答 5 个随机问题,如果他按下显示“Hard”的按钮,则必须回答 10 个随机问题。 (Do I need an activity for each question or can i display all the questions randomly using only one activity?). (我是否需要针对每个问题进行一项活动,还是可以仅使用一项活动随机显示所有问题?)。

After the user answers all the questions is gonna see a screen that shows his score and a button that will send him back to menu, also I want to give the user a choice to go back to the quiz and see which questions he answered right or wrong.用户回答完所有问题后会看到一个显示他的分数的屏幕和一个将他送回菜单的按钮,我还想让用户选择返回测验并查看他回答正确的问题或错误的。

Can someone teach me how to make this app?有人可以教我如何制作这个应用程序吗?

Yes you need only one activity for the questions, where they (5 or 10 ques) can be displayed dynamically and after the user has answered all the questions you can start a new activity which will show the result and a button (to go to main menu).是的,您只需要一个活动来回答问题,它们(5 或 10 个问题)可以动态显示,在用户回答完所有问题后,您可以启动一个新活动,该活动将显示结果和一个按钮(转到主要菜单)。 Also give here an option to view all the answered question by starting the same question activity (or new ) and now show all the questions with their correct and user's answer dynamically.还提供了一个选项,通过启动相同的问题活动(或新)来查看所有已回答的问题,现在动态显示所有问题及其正确答案和用户的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM