Android实训案例(九)——答题系统的思绪,自己设计一个题库的体验,一个思路清晰的答题软件制作过程...

Android实训案例(九)——答题系统的思绪,自己设计一个题库的体验,一个思路清晰的答题软件制作过程


项目也是偷师的,决心研究一下数据库。所以写的还是很详细的,各位看官,耐着性子看完,实现结果不重要,思路一定要清晰,我们做一个简单的项目,所以也就设计的比较简陋了,首先新建一个项目——AnswerSystem

这里写图片描述

一.实现项目框架

主页面就是一个问题,四个答案,还有一个正确答案,最后就是翻页了,正确答案默认是隐藏的,所以我们的layout_mian.xml是这样实现的

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">


    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:padding="20dp">

            <TextView
                android:id="@+id/tv_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="问:刘桂林是何许人也?"
                android:textColor="@color/colorAccent"
                android:textSize="22sp"
                android:textStyle="bold" />

            <RadioGroup
                android:id="@+id/mRadioGroup"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp">


                <!--四个选项-->

                <RadioButton
                    android:id="@+id/RadioA"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="大帅哥" />

                <RadioButton
                    android:id="@+id/RadioB"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="参照A" />

                <RadioButton
                    android:id="@+id/RadioC"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="参照B" />

                <RadioButton
                    android:id="@+id/RadioD"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="参照C" />

                <!--正确答案,默认是隐藏的-->

                <TextView
                    an
  • 4
    点赞
  • 45
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值