Github:https://github.com/ghhf/ExamCase
下载地址:http://download.csdn.net/detail/happyghh/9896264
一个简单的实现单选题的APP ,主要的实现逻辑和问题都在代码中详细注释,这里做个总结。
最近在看《Android权威编程指南》,于是就想着,按照书中的例子,自己变换一下,做一个考试中经常出现的,单项选择题的功能,最后给出答案和总结。貌似一个非常简单的功能,自己在实现起来还是遇到了不少问题,所以说,Talk is cheap,show me the code。
总体设计思路:
主布局很简单,一个按钮点击后跳转到试题测试页面,进行选择后,可在结果页面查看相应的结果,整体的想法如上图,主要涉及的内容包括:
1)Intent传值
2)RadioButton的使用
3)RecyclerView的使用
具体的实现:
测试试题内容: