Facebook Twitter Instagram
    DeepCrazyWorld
    Facebook Twitter Instagram Pinterest YouTube
    • FLUTTER
      • FLUTTER APP
        • QRCode
        • Quiz App
        • Chat GPT
        • PDF App
        • News App
        • Fitness App
        • Weather App
        • BMI Calculator
        • GAME APP
        • Ecommerce App
        • wallpaper App
        • Finance app
        • Chat App
        • Wallet App
        • Taxi App
        • Quran app
        • Music player app
      • FLUTTER UI
        • Splash Screen
        • Onboarding Screen
        • Login Screen
        • Card Design
        • Drawer
    • PROJECT
      • Android Projects
      • College Projects
      • FLUTTER APP
      • Project Ideas
      • PHP Projects
      • Python Projects
    • SOURCE CODE
    • ANDROID
      • ANDROID APP
      • GAME APP
      • ANDROID STUDIO
    • MCQ
      • AKTU MCQ
        • RPA MCQ
        • COA MCQ
        • HPC MCQ
        • SPM MCQ
        • Renewable Energy All MCQ
        • Data Compression MCQ
        • Data Structure MCQ
        • Digital Image Processing MCQ
        • Software Engineering MCQ
        • Machine Learning MCQ
        • Artificial Intelligence MCQ
      • D PHARMA MCQ
        • Pharmaceutics – I MCQ
        • Pharmacognosy MCQ
        • Pharmaceutical Chemistry MCQ
        • Biochemistry and Clinical Pathology MCQ
        • Human Anatomy and Physiology MCQ
        • Heath Education and Community Pharmacy MCQ
    • INTERVIEW QUESTIONS
      • Flutter Interview Questions
      • INTERVIEW QUESTIONS
      • Python Interview Questions
      • Coding ninjas solution
    • MORE
      • WORDPRESS
        • SEO
        • TOP 10 WORDPRESS THEME
      • PRODUCTIVITY
      • Program
      • QUOTES
    DeepCrazyWorld
    Home»ANDROID APP»Quiz App in Android studio source code free – Android Studio Tutorial
    ANDROID APP

    Quiz App in Android studio source code free – Android Studio Tutorial

    DeepikaBy DeepikaAugust 7, 2020Updated:January 19, 2022No Comments4 Mins Read

    Quiz App is an android based application, and enables the user to undertake a series of questions on Java language. The app is user friendly, and the user shall find it extremely easy to answer the multiple-choice questions. At the end of the quiz, a result-report is generated which states the score. The Quiz app also presents an option to the current user to play the question-round again or quit in between.

    This App was developed as a learning project for Android. It is developed in Android Studio 3.6

    • compileSdkVersion – 29
    • buildToolVersion – 28-0-3
    • minSdkVersion – 17
    • targetSdkVersion -29
    <img decoding=

    Again that we are well versed with Activity, Layout, Views etc its time to get our hands dirty, and create our second application. This application will have a science quiz app, and user will have option to answer in True or False. Based on what the user enters, we will show the user, whether they selected the correct option or not by simply showing a message saying Correct or Incorrect.

    For Quiz App Open Android Studio and go to File → New → New Project. In the New Project window, enter the Application Name as Quiz and company domain as com.technic.quiz and Click on Next.

    Table of Contents

    Toggle
    • MainActivity.java
    • Layout File
    • Manifest File
    • YouTube Video
      • There are four Activities in the app :
    • Quiz app Download
        • Click below to get the source code android application.
          • Download Quiz APP Play Store: Click Here
    • Download Full Source Code
    • Conclusion
      • Cheers!
    • READ MORE…

    MainActivity.java

    package com.technic.myjavaquiz;
    
    import android.content.Intent;
    import android.os.Bundle;
    import android.text.TextUtils;
    import android.view.View;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.Toast;
    
    import androidx.appcompat.app.AppCompatActivity;
    
    
    public class MainActivity extends AppCompatActivity {
    
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
    
    
            Button startbutton=(Button)findViewById(R.id.button);
            Button aboutbutton=(Button)findViewById(R.id.button2);
            final EditText nametext=(EditText)findViewById(R.id.editName);
    
            startbutton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    String name=nametext.getText().toString();
                    Intent intent=new Intent(getApplicationContext(),QuestionsActivity.class);
                    intent.putExtra("myname",name);
                    startActivity(intent);
                }
            });
    
            aboutbutton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Intent intent=new Intent(getApplicationContext(),DeveloperActivity.class);
                    startActivity(intent);
                }
            });
        }
    }
    

    In the next step you will be asked to select the targeted device, on which your application will be supported. Let’s stick with Phone and Tablet for this App application. And in the drop down saying Minimum SDK choose API 16: Android 4.1 (Jelly Bean), this means our App will work on all the Phones and Tablets with Android Version 4.1 till 7(the latest version). Click on Next button.

    Layout File

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        tools:context=".MainActivity">
    
        <TextView
            android:id="@+id/textView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="55dp"
            android:text="Java Quiz"
            android:textColor="#F44336"
            android:textSize="60dp" />
    
        <Button
            android:id="@+id/button"
            android:layout_width="200dp"
            android:layout_height="52dp"
    
            android:layout_above="@+id/textView"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginStart="13dp"
            android:layout_marginLeft="13dp"
            android:layout_marginBottom="215dp"
            android:background="#FF5722"
            android:text="Start"
            android:textColor="#ffffff"
            android:textSize="30dp" />
    
        <EditText
            android:id="@+id/editName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="210dp"
            android:ems="10"
            android:hint="Enter your name"
            android:inputType="textPersonName"
            android:textColor="#df040b" />
    
        <Button
            android:id="@+id/button2"
            android:layout_width="200dp"
            android:layout_height="52dp"
            android:layout_alignStart="@+id/button"
            android:layout_alignLeft="@+id/button"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginStart="-2dp"
            android:layout_marginLeft="-2dp"
            android:layout_marginBottom="134dp"
            android:background="#01579B"
            android:text="About"
            android:textColor="#ffffff"
            android:textSize="30dp" />
    
    
    
    </RelativeLayout>
    

    Now its time to add the first Activity to our application. Select the Empty Activity from the avilable options. And click on Next.

    Enter the activity name to be Main Activity, and Android Studio will automatically fill the layout file name. It is a standard practice to add suffix Activity in the Activity names and we will follow it. And for layout XML file, it is all words in small and in reverse order, separated by underscore _. Click on Finish to create this app project.

    Manifest File

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.technic.myjavaquiz">
    
        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
    
    
            <activity android:name=".MainActivity">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity android:name=".QuestionsActivity">
                <intent-filter>
                    <action android:name=".QuestionsActivity" />
    
                    <category android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>
            <activity android:name=".DeveloperActivity">
                <intent-filter>
                    <action android:name=".DeveloperActivity" />
    
                    <category android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>
            <activity android:name=".ResultActivity"></activity>
        </application>
    
    </manifest>

    Android Studio will take some time, to build everything, so be a little patient. source code android quiz,Once Android Studio finished building your project, you will see a new project added to the left project tool window, the activity_science.xml file will be open and in the Preview tool window you will see the preview for your app. Quiz App-If the Preview tool window in not open, go to View → Tool Windows → Preview, and the preview window will show up on the right side.

    YouTube Video

    There are four Activities in the app :

    Main – displays Home Screen of application.
    Questions – displays MCQ’s and currents Score.
    Results – displays Results after finishing the quiz.
    Developers – displays the information about the developers.

    Quiz app Download

    Click below to get the source code android application.

    Download Quiz APP Play Store: Click Here

    Download Full Source Code

    Click below to get the full source code android Quiz App application.

    GO TO DOWNLOAD PAGE

    Conclusion

    We have successfully created a Quiz Application Android application using Android Studio..


    Cheers!

    READ MORE…

    Share. Facebook Twitter LinkedIn WhatsApp Telegram Pinterest Reddit Email
    Previous ArticleHow To Create YouTube Android App In Android Studio (Step By Step)
    Next Article How To Create Digital Calculator App In Android Studio: Step by step

    Related Posts

    Quizler: A simple beautiful Quiz app built with Flutter

    Quiz App 2 Mins Read

    A Flutter MCQ quiz app with firebase google login

    Quiz App 2 Mins Read

    A simple quiz app for weebs made with flutter source code

    Quiz App 2 Mins Read

    Music player app in flutter and dart using node.js music API

    ANDROID APP 2 Mins Read

    Comments are closed.

    Recent Posts
    • Implementing a Dynamic FAQ Screen UI in Flutter Using ExpansionTile March 29, 2025
    • Creating an Instruction UI Screen in Flutter Application March 29, 2025
    • Animated Backgrounds in Flutter: A Complete Guide March 15, 2025
    • How to make Diary App using flutter stepwise using getx August 31, 2024
    • How to Create Music Player UI screen with fully functional in flutter August 30, 2024
    • How to make ListView Builder Ui in flutter with Source Code August 29, 2024
    • Create a TabBar View in flutter with fully functional stepwise August 28, 2024
    • How to create TabBar view in flutter with source code step wise August 27, 2024
    • How to make Heart rate measure app with Flutter stepwise August 26, 2024
    • How to make ChatGpt App in flutter with source code Stepwise August 25, 2024
    Facebook Twitter Instagram Pinterest YouTube
    • About
    • Contact
    • Disclaimer
    • Privacy Policy
    Copyright by DeepCrazyWorld © 2025

    Type above and press Enter to search. Press Esc to cancel.