使用arraylist进行测验问题 [英] Using arraylist for quiz questions

查看:56
本文介绍了使用arraylist进行测验问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Android Studio中创建一个测验,但不是使用MySQL数据库或等效的,我想通过ArrayList来实现。



我尝试了什么:



我怎么能做到这一点?示例很有用!

I want to create a quiz in Android Studio, but instead of using a MySQL database or equivalent, I want to do it via ArrayList.

What I have tried:

How could I achieve this? Examples would be useful!

推荐答案

创建一个管理问题和相关答案的类。然后创建一个包含所有QA对象的List并从那里开始。可以在 https://www.codeproject.com/KB/android/ 找到大量Android代码示例[ ^ ]。
Create a class that manages the questions and associated answers. Then create a List of all the QA objects and go from there. Plenty of examples of Android code may be found at https://www.codeproject.com/KB/android/[^].


这篇关于使用arraylist进行测验问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆