maciej-traczyk %!s(int64=3) %!d(string=hai) anos
pai
achega
416a1d53b1
Modificáronse 100 ficheiros con 6572 adicións e 0 borrados
  1. 15 0
      .gitignore
  2. 3 0
      .idea/.gitignore
  3. 1 0
      .idea/.name
  4. 6 0
      .idea/compiler.xml
  5. 17 0
      .idea/deploymentTargetDropDown.xml
  6. 19 0
      .idea/gradle.xml
  7. 10 0
      .idea/misc.xml
  8. 6 0
      .idea/vcs.xml
  9. 1 0
      app/.gitignore
  10. 46 0
      app/build.gradle
  11. 47 0
      app/google-services.json
  12. 21 0
      app/proguard-rules.pro
  13. 26 0
      app/src/androidTest/java/com/example/programingquiz/ExampleInstrumentedTest.java
  14. 101 0
      app/src/main/AndroidManifest.xml
  15. 156 0
      app/src/main/java/com/example/programingquiz/AdvancedTaskActivity.java
  16. 135 0
      app/src/main/java/com/example/programingquiz/BeginnerTaskActivity.java
  17. 133 0
      app/src/main/java/com/example/programingquiz/CategoryActivity.java
  18. 97 0
      app/src/main/java/com/example/programingquiz/CategoryAdapter.java
  19. 220 0
      app/src/main/java/com/example/programingquiz/LoginActivity.java
  20. 180 0
      app/src/main/java/com/example/programingquiz/MainActivity.java
  21. 144 0
      app/src/main/java/com/example/programingquiz/MenuActivity.java
  22. 131 0
      app/src/main/java/com/example/programingquiz/RankingActivity.java
  23. 62 0
      app/src/main/java/com/example/programingquiz/RankingAdapter.java
  24. 173 0
      app/src/main/java/com/example/programingquiz/RegisterActivity.java
  25. 196 0
      app/src/main/java/com/example/programingquiz/ReportActivity.java
  26. 53 0
      app/src/main/java/com/example/programingquiz/StartActivity.java
  27. 30 0
      app/src/main/res/drawable-v24/ic_launcher_foreground.xml
  28. 25 0
      app/src/main/res/drawable-v24/icons8_google_96.xml
  29. 10 0
      app/src/main/res/drawable/correct_answer.xml
  30. 10 0
      app/src/main/res/drawable/custom_button_1.xml
  31. 12 0
      app/src/main/res/drawable/custom_input.xml
  32. 8 0
      app/src/main/res/drawable/gradient_background.xml
  33. 5 0
      app/src/main/res/drawable/ic_baseline_email_24.xml
  34. 5 0
      app/src/main/res/drawable/ic_baseline_lock_24.xml
  35. 5 0
      app/src/main/res/drawable/ic_baseline_person_24.xml
  36. 5 0
      app/src/main/res/drawable/ic_baseline_turn_left_24.xml
  37. 170 0
      app/src/main/res/drawable/ic_launcher_background.xml
  38. 5 0
      app/src/main/res/drawable/icons8_a.xml
  39. 6 0
      app/src/main/res/drawable/icons8_b.xml
  40. 4 0
      app/src/main/res/drawable/icons8_c.xml
  41. 5 0
      app/src/main/res/drawable/icons8_d.xml
  42. 5 0
      app/src/main/res/drawable/icons8_logout_24.xml
  43. 5 0
      app/src/main/res/drawable/icons8_play_button_circled_24.xml
  44. 30 0
      app/src/main/res/drawable/icons8_ranking_24.xml
  45. 10 0
      app/src/main/res/drawable/incorrect_answer.xml
  46. 15 0
      app/src/main/res/drawable/menu_player_info_box.xml
  47. 8 0
      app/src/main/res/drawable/orange_out_line.xml
  48. 6 0
      app/src/main/res/drawable/toggle_widget_background.xml
  49. 12 0
      app/src/main/res/drawable/trapeze_bottom.xml
  50. 12 0
      app/src/main/res/drawable/trapeze_left.xml
  51. 12 0
      app/src/main/res/drawable/trapeze_right.xml
  52. BIN=BIN
      app/src/main/res/font/k2d_bold.ttf
  53. BIN=BIN
      app/src/main/res/font/k2d_semi_bold.ttf
  54. 322 0
      app/src/main/res/layout/activity_advanced_task.xml
  55. 262 0
      app/src/main/res/layout/activity_beginner_task.xml
  56. 325 0
      app/src/main/res/layout/activity_category.xml
  57. 352 0
      app/src/main/res/layout/activity_login.xml
  58. 46 0
      app/src/main/res/layout/activity_main.xml
  59. 388 0
      app/src/main/res/layout/activity_menu.xml
  60. 327 0
      app/src/main/res/layout/activity_ranking.xml
  61. 304 0
      app/src/main/res/layout/activity_register.xml
  62. 358 0
      app/src/main/res/layout/activity_report.xml
  63. 200 0
      app/src/main/res/layout/activity_start.xml
  64. 47 0
      app/src/main/res/layout/category_row.xml
  65. 99 0
      app/src/main/res/layout/ranking_row.xml
  66. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  67. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  68. BIN=BIN
      app/src/main/res/mipmap-hdpi/ic_launcher.webp
  69. BIN=BIN
      app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
  70. BIN=BIN
      app/src/main/res/mipmap-mdpi/ic_launcher.webp
  71. BIN=BIN
      app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
  72. BIN=BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher.webp
  73. BIN=BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
  74. BIN=BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
  75. BIN=BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
  76. BIN=BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
  77. BIN=BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
  78. 16 0
      app/src/main/res/values-night/themes.xml
  79. 19 0
      app/src/main/res/values/colors.xml
  80. 3 0
      app/src/main/res/values/strings.xml
  81. 16 0
      app/src/main/res/values/themes.xml
  82. 13 0
      app/src/main/res/xml/backup_rules.xml
  83. 19 0
      app/src/main/res/xml/data_extraction_rules.xml
  84. 17 0
      app/src/test/java/com/example/programingquiz/ExampleUnitTest.java
  85. 19 0
      build.gradle
  86. 21 0
      gradle.properties
  87. BIN=BIN
      gradle/wrapper/gradle-wrapper.jar
  88. 6 0
      gradle/wrapper/gradle-wrapper.properties
  89. 185 0
      gradlew
  90. 89 0
      gradlew.bat
  91. 33 0
      programmig-quiz-back-end/.gitignore
  92. BIN=BIN
      programmig-quiz-back-end/.mvn/wrapper/maven-wrapper.jar
  93. 2 0
      programmig-quiz-back-end/.mvn/wrapper/maven-wrapper.properties
  94. 316 0
      programmig-quiz-back-end/mvnw
  95. 188 0
      programmig-quiz-back-end/mvnw.cmd
  96. 72 0
      programmig-quiz-back-end/pom.xml
  97. 12 0
      programmig-quiz-back-end/serviceAccountKey.json
  98. 13 0
      programmig-quiz-back-end/src/main/java/com/example/firebase/programmigquizbackend/ProgrammigQuizBackEndApplication.java
  99. 26 0
      programmig-quiz-back-end/src/main/java/com/example/firebase/programmigquizbackend/controller/CategoryController.java
  100. 28 0
      programmig-quiz-back-end/src/main/java/com/example/firebase/programmigquizbackend/controller/TaskController.java

+ 15 - 0
.gitignore

@@ -0,0 +1,15 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx
+local.properties

+ 3 - 0
.idea/.gitignore

@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml

+ 1 - 0
.idea/.name

@@ -0,0 +1 @@
+ProgramingQuiz

+ 6 - 0
.idea/compiler.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <bytecodeTargetLevel target="11" />
+  </component>
+</project>

+ 17 - 0
.idea/deploymentTargetDropDown.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="deploymentTargetDropDown">
+    <targetSelectedWithDropDown>
+      <Target>
+        <type value="QUICK_BOOT_TARGET" />
+        <deviceKey>
+          <Key>
+            <type value="VIRTUAL_DEVICE_PATH" />
+            <value value="C:\Users\Cielak\.android\avd\Pixel_3_API_27.avd" />
+          </Key>
+        </deviceKey>
+      </Target>
+    </targetSelectedWithDropDown>
+    <timeTargetWasSelectedWithDropDown value="2023-01-11T13:02:34.846757Z" />
+  </component>
+</project>

+ 19 - 0
.idea/gradle.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="GradleMigrationSettings" migrationVersion="1" />
+  <component name="GradleSettings">
+    <option name="linkedExternalProjectsSettings">
+      <GradleProjectSettings>
+        <option name="testRunner" value="GRADLE" />
+        <option name="distributionType" value="DEFAULT_WRAPPED" />
+        <option name="externalProjectPath" value="$PROJECT_DIR$" />
+        <option name="modules">
+          <set>
+            <option value="$PROJECT_DIR$" />
+            <option value="$PROJECT_DIR$/app" />
+          </set>
+        </option>
+      </GradleProjectSettings>
+    </option>
+  </component>
+</project>

+ 10 - 0
.idea/misc.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/build/classes" />
+  </component>
+  <component name="ProjectType">
+    <option name="id" value="Android" />
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 1 - 0
app/.gitignore

@@ -0,0 +1 @@
+/build

+ 46 - 0
app/build.gradle

@@ -0,0 +1,46 @@
+plugins {
+    id 'com.android.application'
+    id 'com.google.gms.google-services'
+}
+
+android {
+    namespace 'com.example.programingquiz'
+    compileSdk 32
+
+    defaultConfig {
+        applicationId "com.example.programingquiz"
+        minSdk 23
+        targetSdk 32
+        versionCode 1
+        versionName "1.0"
+
+        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+    }
+
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+        }
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+}
+
+dependencies {
+
+    implementation platform('com.google.firebase:firebase-bom:31.1.1')
+    implementation 'com.google.android.gms:play-services-auth:20.4.0'
+    implementation 'com.android.volley:volley:1.2.1'
+    implementation 'com.google.firebase:firebase-auth'
+    implementation 'androidx.appcompat:appcompat:1.5.1'
+    implementation 'com.google.firebase:firebase-analytics'
+    implementation 'androidx.appcompat:appcompat:1.5.1'
+    implementation 'com.google.android.material:material:1.7.0'
+    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
+    testImplementation 'junit:junit:4.13.2'
+    androidTestImplementation 'androidx.test.ext:junit:1.1.4'
+    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
+}

+ 47 - 0
app/google-services.json

@@ -0,0 +1,47 @@
+{
+  "project_info": {
+    "project_number": "662307302553",
+    "project_id": "programmingquiz-2bfbb",
+    "storage_bucket": "programmingquiz-2bfbb.appspot.com"
+  },
+  "client": [
+    {
+      "client_info": {
+        "mobilesdk_app_id": "1:662307302553:android:bd49b53f973e2e5def9c08",
+        "android_client_info": {
+          "package_name": "com.example.programingquiz"
+        }
+      },
+      "oauth_client": [
+        {
+          "client_id": "662307302553-s4d5c0no5e9tsiismpivoklstjdlbd1b.apps.googleusercontent.com",
+          "client_type": 1,
+          "android_info": {
+            "package_name": "com.example.programingquiz",
+            "certificate_hash": "5dff45b9d7bc3942fecb7e96bf2e981de703f739"
+          }
+        },
+        {
+          "client_id": "662307302553-q7t0564jud2v20a1k9j9u7orc6eh4agq.apps.googleusercontent.com",
+          "client_type": 3
+        }
+      ],
+      "api_key": [
+        {
+          "current_key": "AIzaSyCdMdE6n7x5oSkh38cpgxr8P9tuI8Hzwio"
+        }
+      ],
+      "services": {
+        "appinvite_service": {
+          "other_platform_oauth_client": [
+            {
+              "client_id": "662307302553-q7t0564jud2v20a1k9j9u7orc6eh4agq.apps.googleusercontent.com",
+              "client_type": 3
+            }
+          ]
+        }
+      }
+    }
+  ],
+  "configuration_version": "1"
+}

+ 21 - 0
app/proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 26 - 0
app/src/androidTest/java/com/example/programingquiz/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.example.programingquiz;
+
+import android.content.Context;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
+        assertEquals("com.example.programingquiz", appContext.getPackageName());
+    }
+}

+ 101 - 0
app/src/main/AndroidManifest.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools">
+
+    <application
+        android:allowBackup="true"
+        android:dataExtractionRules="@xml/data_extraction_rules"
+        android:fullBackupContent="@xml/backup_rules"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:roundIcon="@mipmap/ic_launcher_round"
+        android:supportsRtl="true"
+        android:theme="@style/Theme.AppCompat.NoActionBar"
+        tools:targetApi="31">
+        <activity
+            android:name=".RankingActivity"
+            android:exported="false"
+            android:screenOrientation="portrait">
+            <meta-data
+                android:name="android.app.lib_name"
+                android:value="" />
+        </activity>
+        <activity
+            android:name=".ReportActivity"
+            android:exported="false"
+            android:screenOrientation="portrait">
+            <meta-data
+                android:name="android.app.lib_name"
+                android:value="" />
+        </activity>
+        <activity
+            android:name=".AdvancedTaskActivity"
+            android:exported="false"
+            android:screenOrientation="portrait">
+            <meta-data
+                android:name="android.app.lib_name"
+                android:value="" />
+        </activity>
+        <activity
+            android:name=".BeginnerTaskActivity"
+            android:exported="false"
+            android:screenOrientation="portrait">
+            <meta-data
+                android:name="android.app.lib_name"
+                android:value="" />
+        </activity>
+        <activity
+            android:name=".CategoryActivity"
+            android:exported="false"
+            android:screenOrientation="portrait">
+            <meta-data
+                android:name="android.app.lib_name"
+                android:value="" />
+        </activity>
+        <activity
+            android:name=".MenuActivity"
+            android:exported="false"
+            android:screenOrientation="portrait">
+            <meta-data
+                android:name="android.app.lib_name"
+                android:value="" />
+        </activity>
+        <activity
+            android:name=".LoginActivity"
+            android:exported="false"
+            android:screenOrientation="portrait">
+            <meta-data
+                android:name="android.app.lib_name"
+                android:value="" />
+        </activity>
+        <activity
+            android:name=".RegisterActivity"
+            android:exported="false"
+            android:screenOrientation="portrait">
+            <meta-data
+                android:name="android.app.lib_name"
+                android:value="" />
+        </activity> <!-- <activity -->
+        <!-- android:name=".StartActivity" -->
+        <!-- android:exported="false"> -->
+        <!-- <meta-data -->
+        <!-- android:name="android.app.lib_name" -->
+        <!-- android:value="" /> -->
+        <!-- </activity> -->
+        <activity
+            android:name=".StartActivity"
+            android:exported="true"
+            android:screenOrientation="portrait">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+
+            <meta-data
+                android:name="android.app.lib_name"
+                android:value="" />
+        </activity>
+    </application>
+
+</manifest>

+ 156 - 0
app/src/main/java/com/example/programingquiz/AdvancedTaskActivity.java

@@ -0,0 +1,156 @@
+package com.example.programingquiz;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.Volley;
+import com.google.android.material.snackbar.Snackbar;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+public class AdvancedTaskActivity extends AppCompatActivity {
+
+    TextView questionTV, contentTV;
+    Button aBtn, bBtn, cBtn, dBtn;
+
+    CategoryActivity.DifficultyType difficultyType;
+    String login, taskCategory;
+    LoginActivity.LoginType loginType;
+    long taskID;
+
+    @Override
+    public void onBackPressed() {}
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_advanced_task);
+
+        questionTV = findViewById(R.id.questionTV);
+        contentTV = findViewById(R.id.contentTV);
+        aBtn = findViewById(R.id.aBtn);
+        bBtn = findViewById(R.id.bBtn);
+        cBtn = findViewById(R.id.cBtn);
+        dBtn = findViewById(R.id.dBtn);
+
+        aBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openReportActivity(aBtn.getText().toString());
+            }
+        });
+
+        bBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openReportActivity(bBtn.getText().toString());
+            }
+        });
+
+        cBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openReportActivity(cBtn.getText().toString());
+            }
+        });
+
+        dBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openReportActivity(dBtn.getText().toString());
+            }
+        });
+
+        getIntentExtras();
+        drawTask();
+    }
+
+    private void getIntentExtras(){
+        Intent intent = getIntent();
+        login = intent.getStringExtra("login");
+        loginType = (LoginActivity.LoginType) intent.getSerializableExtra("type");
+        taskCategory = intent.getStringExtra("taskCategory").toLowerCase();
+        difficultyType = (CategoryActivity.DifficultyType) intent.getSerializableExtra("difficultyType");
+    }
+
+    private void drawTask(){
+        String url = StartActivity.URL + "api/drawTask/" + taskCategory + "/" + difficultyType.toString();
+        RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+                try {
+                    questionTV.setText(response.getString("question"));
+                    taskID = response.getInt("id");
+
+                    contentTV.setText(response.getString("content").replace("\\n", "\n").replace("\\t", "\t"));
+
+                    JSONArray array = response.getJSONArray("answers");
+                    ArrayList<String> answers = shuffleAnswers(array);
+                    aBtn.setText(answers.get(0));
+                    bBtn.setText(answers.get(1));
+                    cBtn.setText(answers.get(2));
+                    dBtn.setText(answers.get(3));
+
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+        }, new com.android.volley.Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+                Snackbar.make(findViewById(android.R.id.content), "some error occurred, please try again later", Snackbar.LENGTH_LONG).show();
+
+                String errorMsg = error.toString();
+                System.out.println(errorMsg);
+            }
+        });
+        queue.add(request);
+    }
+
+    private ArrayList<String> shuffleAnswers(JSONArray answers){
+        ArrayList <String> result = new ArrayList<>();
+        for(int i = 0; i < answers.length(); i++) {
+            try {
+                result.add(answers.getString(i));
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }
+        Collections.shuffle(result);
+        return result;
+    }
+
+    private void openReportActivity(String userAnswer){
+        Intent intent = new Intent(this, ReportActivity.class);
+
+        intent.putExtra("login", login);
+        intent.putExtra("type", loginType);
+        intent.putExtra("taskID", taskID);
+        intent.putExtra("taskCategory", taskCategory);
+        intent.putExtra("difficultyType", difficultyType);
+        intent.putExtra("userAnswer", userAnswer);
+        intent.putExtra("aAnswer", aBtn.getText().toString());
+        intent.putExtra("bAnswer", bBtn.getText().toString());
+        intent.putExtra("cAnswer", cBtn.getText().toString());
+        intent.putExtra("dAnswer", dBtn.getText().toString());
+
+        startActivity(intent);
+    }
+
+}

+ 135 - 0
app/src/main/java/com/example/programingquiz/BeginnerTaskActivity.java

@@ -0,0 +1,135 @@
+package com.example.programingquiz;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.Volley;
+import com.google.android.material.snackbar.Snackbar;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+public class BeginnerTaskActivity extends AppCompatActivity {
+
+    TextView questionTV, contentTV;
+    Button aBtn, bBtn;
+
+    CategoryActivity.DifficultyType difficultyType;
+    String login, taskCategory;
+    LoginActivity.LoginType loginType;
+    long taskID;
+
+    @Override
+    public void onBackPressed() {}
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_beginner_task);
+
+        questionTV = findViewById(R.id.questionTV);
+        contentTV = findViewById(R.id.contentTV);
+        aBtn = findViewById(R.id.aBtn);
+        bBtn = findViewById(R.id.bBtn);
+
+        aBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openReportActivity(aBtn.getText().toString());
+            }
+        });
+
+        bBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openReportActivity(bBtn.getText().toString());
+            }
+        });
+
+        getIntentExtras();
+        drawTask();
+    }
+
+    private void getIntentExtras(){
+        Intent intent = getIntent();
+        login = intent.getStringExtra("login");
+        loginType = (LoginActivity.LoginType) intent.getSerializableExtra("type");
+        taskCategory = intent.getStringExtra("taskCategory").toLowerCase();
+        difficultyType = (CategoryActivity.DifficultyType) intent.getSerializableExtra("difficultyType");
+    }
+
+    private void drawTask(){
+        String url = StartActivity.URL + "api/drawTask/" + taskCategory + "/" + difficultyType.toString();
+        RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+                try {
+                    questionTV.setText(response.getString("question"));
+                    taskID = response.getInt("id");
+
+                    contentTV.setText(response.getString("content").replace("\\n", "\n").replace("\\t", "\t"));
+
+                    JSONArray array = response.getJSONArray("answers");
+                    ArrayList <String> answers = shuffleAnswers(array);
+                    aBtn.setText(answers.get(0));
+                    bBtn.setText(answers.get(1));
+
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+        }, new com.android.volley.Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+                Snackbar.make(findViewById(android.R.id.content), "some error occurred, please try again later", Snackbar.LENGTH_LONG).show();
+
+                String errorMsg = error.toString();
+                System.out.println(errorMsg);
+            }
+        });
+        queue.add(request);
+    }
+
+    private ArrayList<String> shuffleAnswers(JSONArray answers){
+        ArrayList <String> result = new ArrayList<>();
+        for(int i = 0; i < answers.length(); i++) {
+            try {
+                result.add(answers.getString(i));
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }
+        Collections.shuffle(result);
+        return result;
+    }
+
+    private void openReportActivity(String userAnswer){
+        Intent intent = new Intent(this, ReportActivity.class);
+
+        intent.putExtra("login", login);
+        intent.putExtra("type", loginType);
+        intent.putExtra("taskID", taskID);
+        intent.putExtra("difficultyType", difficultyType);
+        intent.putExtra("taskCategory", taskCategory);
+        intent.putExtra("userAnswer", userAnswer);
+        intent.putExtra("aAnswer", aBtn.getText().toString());
+        intent.putExtra("bAnswer", bBtn.getText().toString());
+
+        startActivity(intent);
+    }
+}

+ 133 - 0
app/src/main/java/com/example/programingquiz/CategoryActivity.java

@@ -0,0 +1,133 @@
+package com.example.programingquiz;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.Volley;
+import com.google.android.material.snackbar.Snackbar;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+
+public class CategoryActivity extends AppCompatActivity {
+
+    public enum DifficultyType {BEGINNER, ADVANCED}
+
+    Button backBtn, advancedBtn, beginnerBtn;
+
+    LoginActivity.LoginType loginType;
+    String login;
+    DifficultyType difficultyType = DifficultyType.BEGINNER;
+
+    RecyclerView recyclerView;
+    CategoryAdapter categoryAdapter = null;
+
+
+    @Override
+    public void onBackPressed() {}
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_category);
+
+        backBtn = findViewById(R.id.backBtn);
+        advancedBtn = findViewById(R.id.advanced);
+        beginnerBtn = findViewById(R.id.beginner);
+        recyclerView = findViewById(R.id.categoriesRecycleView);
+
+        Intent intent = getIntent();
+        login = intent.getStringExtra("login");
+        loginType = (LoginActivity.LoginType) intent.getSerializableExtra("type");
+
+        backBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openMenuActivity();
+            }
+        });
+
+        advancedBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setDifficultyType(DifficultyType.ADVANCED);
+            }
+        });
+
+        beginnerBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setDifficultyType(DifficultyType.BEGINNER);
+            }
+        });
+
+        getCategories();
+    }
+
+    private void getCategories(){
+        ArrayList<String> list = new ArrayList<>();
+        String url = StartActivity.URL + "api/getCategories";
+        RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+                JSONArray array;
+                try {
+                    array = response.getJSONArray("categories");
+                    for(int i = 0; i < array.length(); i++) {
+                        list.add(array.getString(i));
+                    }
+                    setUpRecycleView(list);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+        }, new com.android.volley.Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+                Snackbar.make(findViewById(android.R.id.content), "some error occurred, please try again later", Snackbar.LENGTH_LONG).show();
+
+                String errorMsg = error.toString();
+                System.out.println(errorMsg);
+            }
+        });
+        queue.add(request);
+    }
+
+    private void setUpRecycleView(ArrayList<String> categories){
+        recyclerView.setLayoutManager(new LinearLayoutManager(this));
+        categoryAdapter = new CategoryAdapter(categories, this, login, difficultyType, loginType);
+        recyclerView.setAdapter(categoryAdapter);
+        recyclerView.setLayoutManager(new LinearLayoutManager(this));
+    }
+
+    private void setDifficultyType(DifficultyType type){
+        if(categoryAdapter != null){
+            categoryAdapter.setDifficultyType(type);
+        }
+        difficultyType = type;
+    }
+
+
+    private void openMenuActivity(){
+        Intent intent = new Intent(this, MenuActivity.class);
+        intent.putExtra("login", login);
+        intent.putExtra("type", loginType);
+        startActivity(intent);
+    }
+
+}

+ 97 - 0
app/src/main/java/com/example/programingquiz/CategoryAdapter.java

@@ -0,0 +1,97 @@
+package com.example.programingquiz;
+
+import android.content.Context;
+import android.content.Intent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+import androidx.annotation.NonNull;
+import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.recyclerview.widget.RecyclerView;
+
+import java.util.ArrayList;
+
+public class CategoryAdapter extends RecyclerView.Adapter<CategoryAdapter.MyViewHolder> {
+
+    CategoryActivity.DifficultyType difficultyType;
+    ArrayList<String> categories;
+    String login;
+    LoginActivity.LoginType loginType;
+    Context context;
+
+    public CategoryAdapter(ArrayList<String> categoryName, Context context, String login, CategoryActivity.DifficultyType difficultyType, LoginActivity.LoginType loginType) {
+        this.categories = categoryName;
+        this.context = context;
+        this.difficultyType = difficultyType;
+        this.login = login;
+        this.loginType = loginType;
+    }
+
+    @NonNull
+    @Override
+    public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        LayoutInflater inflater = LayoutInflater.from(context);
+        View view = inflater.inflate(R.layout.category_row,parent,false);
+        return new MyViewHolder(view);
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
+        holder.title.setText(categories.get(position));
+
+        holder.layout.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if(difficultyType == CategoryActivity.DifficultyType.BEGINNER){
+                    openBeginnerTaskActivity(categories.get(holder.getAdapterPosition()));
+                }
+                else{
+                    openAdvancedTaskActivity(categories.get(holder.getAdapterPosition()));
+                }
+            }
+        });
+    }
+
+    @Override
+    public int getItemCount() {
+        return categories.size();
+    }
+
+    public void setDifficultyType(CategoryActivity.DifficultyType difficultyType){
+        this.difficultyType = difficultyType;
+    }
+
+    private void openBeginnerTaskActivity(String taskCategory){
+        Intent intent = new Intent(context, BeginnerTaskActivity.class);
+
+        intent.putExtra("login", login);
+        intent.putExtra("type", loginType);
+        intent.putExtra("taskCategory", taskCategory);
+        intent.putExtra("difficultyType", difficultyType);
+
+        context.startActivity(intent);
+    }
+
+    private void openAdvancedTaskActivity(String taskCategory){
+        Intent intent = new Intent(context, AdvancedTaskActivity.class);
+
+        intent.putExtra("login", login);
+        intent.putExtra("type", loginType);
+        intent.putExtra("taskCategory", taskCategory);
+        intent.putExtra("difficultyType", difficultyType);
+
+        context.startActivity(intent);
+    }
+
+    public static class MyViewHolder extends RecyclerView.ViewHolder{
+        TextView title;
+        ConstraintLayout layout;
+
+        public MyViewHolder(@NonNull View itemView) {
+            super(itemView);
+            title = itemView.findViewById(R.id.titleTextView);
+            layout = itemView.findViewById(R.id.singleCategoryLayout);
+        }
+    }
+}

+ 220 - 0
app/src/main/java/com/example/programingquiz/LoginActivity.java

@@ -0,0 +1,220 @@
+package com.example.programingquiz;
+
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.Volley;
+import com.google.android.gms.auth.api.signin.GoogleSignIn;
+import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
+import com.google.android.gms.auth.api.signin.GoogleSignInClient;
+import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
+import com.google.android.gms.common.api.ApiException;
+import com.google.android.gms.common.api.Status;
+import com.google.android.gms.tasks.Task;
+import com.google.android.material.snackbar.Snackbar;
+import com.google.firebase.auth.AuthCredential;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+import com.google.firebase.auth.GoogleAuthProvider;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Objects;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class LoginActivity extends AppCompatActivity {
+
+    private static final int RC_GOOGLE_SIGN_IN = 9001;
+    private GoogleSignInClient mGoogleSignInClient;
+    private FirebaseAuth mAuth;
+
+    public enum LoginType {USERNAME, EMAIL}
+
+    EditText loginET, passwordET, signupHyperLink, signUpWithGoogleET;
+    Button LoginBtn;
+
+    @Override
+    public void onBackPressed() {}
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_login);
+
+        loginET = findViewById(R.id.loginET);
+        passwordET = findViewById(R.id.passwordET);
+        signupHyperLink = findViewById(R.id.signupHyperLink);
+        signUpWithGoogleET = findViewById(R.id.signUpWithGoogleET);
+        LoginBtn = findViewById(R.id.LoginBtn);
+
+        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
+                .requestIdToken(getString(R.string.default_web_client_id))
+                .requestEmail()
+                .build();
+
+        mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
+        mAuth = FirebaseAuth.getInstance();
+
+        displayEntranceSnackBar();
+
+        LoginBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                String output = checkInputCorrectness();
+                if(output.equals("success")){
+                    LoginType type = getLoginType(loginET.getText().toString());
+                    String url = StartActivity.URL + "api/validateUser/" + loginET.getText().toString() + "/" + passwordET.getText().toString() + "/" + type.toString();
+                    loginUser(url, loginET.getText().toString(), type);
+                }
+                else{
+                    Snackbar.make(findViewById(android.R.id.content), output, Snackbar.LENGTH_LONG).show();
+                }
+            }
+        });
+
+        signUpWithGoogleET.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Intent signInIntent = mGoogleSignInClient.getSignInIntent();
+                startActivityIfNeeded(signInIntent,RC_GOOGLE_SIGN_IN);
+            }
+        });
+
+        signupHyperLink.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openRegisterActivity();
+            }
+        });
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+
+        if(requestCode == RC_GOOGLE_SIGN_IN){
+            Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
+            try {
+                GoogleSignInAccount account = task.getResult(ApiException.class);
+                if (account == null) {
+                    throw new ApiException(Status.RESULT_INTERNAL_ERROR);
+                }
+                firebaseAuthWithGoogle(account.getIdToken());
+            } catch (ApiException e) {
+                Snackbar.make(findViewById(android.R.id.content), "Login failed", Snackbar.LENGTH_LONG).show();
+            }
+        }
+    }
+
+    private void firebaseAuthWithGoogle(String idToken) {
+        AuthCredential credential = GoogleAuthProvider.getCredential(idToken, null);
+        mAuth.signInWithCredential(credential)
+                .addOnCompleteListener(this, task -> {
+                    if (task.isSuccessful()) {
+                        FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
+                        String url = StartActivity.URL + "api/validateGoogleUser/" + Objects.requireNonNull(user).getDisplayName() + "/" + user.getEmail() + "/" + user.getUid();
+                        loginUser(url, user.getEmail(), LoginType.EMAIL);
+                    } else {
+                        Snackbar.make(findViewById(android.R.id.content), "Login failed", Snackbar.LENGTH_LONG).show();
+                    }
+                });
+    }
+
+    private LoginType getLoginType(String login){
+        String regexPattern = "^(.+)@(.+)$";
+        Pattern pattern = Pattern.compile(regexPattern);
+        Matcher matcher = pattern.matcher(login);
+
+        if(matcher.matches()){
+            return LoginType.EMAIL;
+        }
+        else{
+            return LoginType.USERNAME;
+        }
+    }
+
+    private String checkInputCorrectness(){
+        String result = "success";
+
+        if(loginET.getText().toString().equals("")){
+            result = "UserName/Email address is required";
+        }
+        else if(passwordET.getText().toString().equals("")){
+            result = "please enter your password";
+        }
+
+        return result;
+    }
+
+    private void loginUser(String url, String login, LoginType type){
+        RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+
+                String result = "", status = "";
+
+                try {
+                    result = response.getString("result");
+                    status = response.getString("status");
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+
+                if(result.equals("success")){
+                    openMenuActivity(login, type);
+                }
+                else{
+                    Snackbar.make(findViewById(android.R.id.content), result + " : " + status, Snackbar.LENGTH_LONG).show();
+                }
+            }
+        }, new com.android.volley.Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+
+                Snackbar.make(findViewById(android.R.id.content), "some error occurred, please try again later", Snackbar.LENGTH_LONG).show();
+
+                String errorMsg = error.toString();
+                System.out.println(errorMsg);
+            }
+        });
+        queue.add(request);
+    }
+
+    private void displayEntranceSnackBar(){
+        Intent intent = getIntent();
+        String msg = intent.getStringExtra("msg");
+
+        if(msg != null){
+            Snackbar.make(findViewById(android.R.id.content), msg, Snackbar.LENGTH_LONG).show();
+        }
+    }
+
+    private void openMenuActivity(String login, LoginType type){
+        Intent intent = new Intent(this, MenuActivity.class);
+        intent.putExtra("login", login);
+        intent.putExtra("type", type);
+        startActivity(intent);
+    }
+
+    private void openRegisterActivity() {
+        Intent intent = new Intent(this, RegisterActivity.class);
+        intent.putExtra("prevActivity", "login");
+        startActivity(intent);
+    }
+
+}

+ 180 - 0
app/src/main/java/com/example/programingquiz/MainActivity.java

@@ -0,0 +1,180 @@
+package com.example.programingquiz;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.Volley;
+import com.google.android.gms.auth.api.signin.GoogleSignIn;
+import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
+import com.google.android.gms.auth.api.signin.GoogleSignInClient;
+import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
+import com.google.android.gms.common.SignInButton;
+import com.google.android.gms.common.api.ApiException;
+import com.google.android.gms.common.api.Status;
+import com.google.android.gms.tasks.Task;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
+import com.google.android.material.snackbar.Snackbar;
+import com.google.firebase.auth.AuthCredential;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.GoogleAuthProvider;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class MainActivity extends AppCompatActivity {
+
+    private static final String TAG = "MainActivity";
+    private static final int RC_SIGN_IN = 9001;
+    private FirebaseAuth mAuth;
+    private GoogleSignInClient mGoogleSignInClient;
+    RequestQueue queue;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        queue = Volley.newRequestQueue(this);
+        String url = "http://192.168.50.119:8080/api/products/newObject";
+
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+                System.out.println("\n[Entered]\n");
+                try{
+                    String out = response.get("description").toString();
+                    System.out.println("\n[" + out + "]\n");
+                }catch (JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+        }, new Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+                System.out.println("Error accure!" + error.toString());
+            }
+        });
+
+        SignInButton loginButton = findViewById(R.id.loginButton);
+        //loginButton.setOnClickListener(this);
+        loginButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Log.i(TAG, "loginButton Clicked");
+                Intent signInIntent = mGoogleSignInClient.getSignInIntent();
+                startActivityForResult(signInIntent, RC_SIGN_IN);
+            }
+        });
+
+        FloatingActionButton logoutButton = findViewById(R.id.logoutButton);
+        logoutButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Log.i(TAG, "logoutButton Clicked");
+                signOut();
+            }
+        });
+        //logoutButton.setOnClickListener(this);
+
+        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
+                .requestIdToken(getString(R.string.default_web_client_id))
+                .requestEmail()
+                .build();
+
+        mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
+
+        mAuth = FirebaseAuth.getInstance();
+        if (mAuth.getCurrentUser() == null) {
+            setLoggedOutUi();
+        } else {
+            setLoggedInUi();
+        }
+
+        Button actionButton = findViewById(R.id.actionButton);
+        actionButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                queue.add(request);
+            }
+        });
+    }
+
+
+
+    private void firebaseAuthWithGoogle(String idToken) {
+        AuthCredential credential = GoogleAuthProvider.getCredential(idToken, null);
+        mAuth.signInWithCredential(credential)
+                .addOnCompleteListener(this, task -> {
+                    if (task.isSuccessful()) {
+                        // Sign in success, update UI with the signed-in user's information
+                        Log.i(TAG, "signInWithCredential:success");
+                        setLoggedInUi();
+                        Snackbar.make(findViewById(android.R.id.content),
+                                "Login successful", Snackbar.LENGTH_LONG).show();
+                    } else {
+                        // If sign in fails, display a message to the user.
+                        Log.w(TAG, "signInWithCredential:failure", task.getException());
+                        Snackbar.make(findViewById(android.R.id.content),
+                                "Login failed", Snackbar.LENGTH_LONG).show();
+                    }
+                });
+    }
+
+    private void signOut() {
+        // Firebase sign out
+        mAuth.signOut();
+
+        // Google sign out
+        mGoogleSignInClient.signOut().addOnCompleteListener(this,
+                task -> {
+                    Log.i(TAG, "signOut:success");
+                    setLoggedOutUi();
+                    Snackbar.make(findViewById(android.R.id.content),
+                            "Logout successful", Snackbar.LENGTH_LONG).show();
+                });
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+
+        // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);
+        if (requestCode == RC_SIGN_IN) {
+            Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
+            try {
+                // Google Sign In was successful, authenticate with Firebase
+                GoogleSignInAccount account = task.getResult(ApiException.class);
+                if (account == null) {
+                    throw new ApiException(Status.RESULT_INTERNAL_ERROR);
+                }
+                Log.i(TAG, "firebaseAuthWithGoogle:" + account.getId());
+                firebaseAuthWithGoogle(account.getIdToken());
+            } catch (ApiException e) {
+                // Google Sign In failed, update UI appropriately
+                Log.w(TAG, "Google sign in failed", e);
+                Snackbar.make(findViewById(android.R.id.content),
+                        "Login failed", Snackbar.LENGTH_LONG).show();
+            }
+        }
+    }
+
+    private void setLoggedInUi() {
+        findViewById(R.id.loginButton).setVisibility(View.INVISIBLE);
+        findViewById(R.id.logoutButton).setVisibility(View.VISIBLE);
+    }
+
+    private void setLoggedOutUi() {
+        findViewById(R.id.logoutButton).setVisibility(View.INVISIBLE);
+        findViewById(R.id.loginButton).setVisibility(View.VISIBLE);
+    }
+}

+ 144 - 0
app/src/main/java/com/example/programingquiz/MenuActivity.java

@@ -0,0 +1,144 @@
+package com.example.programingquiz;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.Volley;
+import com.google.android.gms.auth.api.signin.GoogleSignIn;
+import com.google.android.gms.auth.api.signin.GoogleSignInClient;
+import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
+import com.google.android.material.snackbar.Snackbar;
+import com.google.firebase.auth.FirebaseAuth;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Objects;
+
+public class MenuActivity extends AppCompatActivity {
+
+    Button logOutBtn, startBtn, rankingBtn;
+    TextView usernameTV, userPointsTV,userRankingTV;
+
+    LoginActivity.LoginType type;
+    String login;
+
+    @Override
+    public void onBackPressed() {}
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_menu);
+
+        logOutBtn = findViewById(R.id.logOutBtn);
+        startBtn = findViewById(R.id.startBtn);
+        rankingBtn = findViewById(R.id.rankingBtn);
+        usernameTV = findViewById(R.id.usernameTV);
+        userPointsTV = findViewById(R.id.userPointsTV);
+        userRankingTV = findViewById(R.id.userRankingTV);
+        userRankingTV.setVisibility(View.INVISIBLE);
+
+        Intent intent = getIntent();
+        login = intent.getStringExtra("login");
+        type = (LoginActivity.LoginType) intent.getSerializableExtra("type");
+
+        setUpUserInfo();
+
+        startBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openCategoryActivity();
+            }
+        });
+
+        logOutBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                logout();
+            }
+        });
+
+        rankingBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openRankingActivity();
+            }
+        });
+
+    }
+
+    private void setUpUserInfo(){
+        ArrayList<String> list = new ArrayList<>();
+        String url = StartActivity.URL + "api/getUserDetails/" +  login + "/" + type;
+        RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+                JSONArray array;
+                try {
+                    String userName = response.getString("userName");
+                    long score = response.getLong("score");
+                    usernameTV.setText("Name: " + userName);
+                    userPointsTV.setText("Score: " + String.valueOf(score));
+
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+        }, new com.android.volley.Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+                Snackbar.make(findViewById(android.R.id.content), "some error occurred, please try again later", Snackbar.LENGTH_LONG).show();
+
+                String errorMsg = error.toString();
+                System.out.println(errorMsg);
+            }
+        });
+        queue.add(request);
+    }
+
+    private void openCategoryActivity(){
+        Intent intent = new Intent(this, CategoryActivity.class);
+        intent.putExtra("login", login);
+        intent.putExtra("type", type);
+        startActivity(intent);
+    }
+
+    private void openRankingActivity(){
+        Intent intent = new Intent(this, RankingActivity.class);
+        intent.putExtra("login", login);
+        intent.putExtra("type", type);
+        startActivity(intent);
+    }
+
+
+    private void logout(){
+        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
+                .requestIdToken(getString(R.string.default_web_client_id))
+                .requestEmail()
+                .build();
+
+        GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
+        FirebaseAuth mAuth = FirebaseAuth.getInstance();
+        mAuth.signOut();
+        mGoogleSignInClient.signOut().addOnCompleteListener(this, task -> {});
+
+        Intent intent = new Intent(this, LoginActivity.class);
+        startActivity(intent);
+    }
+
+
+}

+ 131 - 0
app/src/main/java/com/example/programingquiz/RankingActivity.java

@@ -0,0 +1,131 @@
+package com.example.programingquiz;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.Volley;
+import com.google.android.material.snackbar.Snackbar;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+
+public class RankingActivity extends AppCompatActivity {
+
+    TextView userNameTV, pointsTV, rankingTV;
+    Button backBtn;
+    RecyclerView rankingRecycleView;
+
+    String login;
+    LoginActivity.LoginType loginType;
+    RankingAdapter rankingAdapter = null;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_ranking);
+
+        userNameTV = findViewById(R.id.userNameTV);
+        pointsTV = findViewById(R.id.pointsTV);
+        rankingTV = findViewById(R.id.rankingTV);
+        backBtn = findViewById(R.id.backBtn);
+        rankingRecycleView = findViewById(R.id.rankingRecycleView);
+
+        backBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openMenuActivity();
+            }
+        });
+
+        getIntentExtras();
+        getRanking();
+    }
+
+    private void getRanking(){
+        ArrayList<String> score = new ArrayList<>();
+        ArrayList<String> users = new ArrayList<>();
+        String url = StartActivity.URL + "api/getUsersRanking";
+        RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+                JSONArray array;
+                try {
+                    JSONArray usersArray =  response.getJSONArray("users");
+
+                    for (int i = usersArray.length()-1; i >= 0; i--) {
+                        JSONObject user = (JSONObject) usersArray.get(i);
+                        users.add(user.getString("userName"));
+                        score.add(String.valueOf(user.getLong("score")));
+                    }
+
+
+                    ArrayList<String> ranking  = getRankingArrayList(score);
+                    setUpRecycleView(users, score, ranking);
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+        }, new com.android.volley.Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+                Snackbar.make(findViewById(android.R.id.content), "some error occurred, please try again later", Snackbar.LENGTH_LONG).show();
+
+                String errorMsg = error.toString();
+                System.out.println(errorMsg);
+            }
+        });
+        queue.add(request);
+    }
+
+
+    private void setUpRecycleView(ArrayList<String> users, ArrayList<String> points, ArrayList<String> ranking){
+        rankingAdapter = new RankingAdapter(this, users, points, ranking);
+        rankingRecycleView.setAdapter(rankingAdapter);
+        rankingRecycleView.setLayoutManager(new LinearLayoutManager(this));
+    }
+
+    private void getIntentExtras(){
+        Intent intent = getIntent();
+        login = intent.getStringExtra("login");
+        loginType = (LoginActivity.LoginType) intent.getSerializableExtra("type");
+    }
+
+    private void openMenuActivity(){
+        Intent intent = new Intent(this, MenuActivity.class);
+        intent.putExtra("login", login);
+        intent.putExtra("type", loginType);
+        startActivity(intent);
+    }
+
+    private ArrayList<String> getRankingArrayList(ArrayList<String> scores){
+        int counter = 1;
+        long lastValue = Long.parseLong(scores.get(0));
+        ArrayList<String> result = new ArrayList<>();
+
+        for(int i = 0; i < scores.size(); i++){
+            if(Long.parseLong(scores.get(i)) < lastValue) {
+                counter++;
+                lastValue = Long.parseLong(scores.get(i));
+            }
+            result.add(String.valueOf(counter));
+        }
+        return result;
+    }
+
+}

+ 62 - 0
app/src/main/java/com/example/programingquiz/RankingAdapter.java

@@ -0,0 +1,62 @@
+package com.example.programingquiz;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.recyclerview.widget.RecyclerView;
+
+import java.util.ArrayList;
+
+public class RankingAdapter extends RecyclerView.Adapter<RankingAdapter.RankingViewHolder>{
+
+    Context context;
+    ArrayList<String> users;
+    ArrayList<String> points;
+    ArrayList<String> ranking;
+
+    public RankingAdapter(Context context, ArrayList<String> users, ArrayList<String> points, ArrayList<String> ranking) {
+        this.context = context;
+        this.users = users;
+        this.points = points;
+        this.ranking = ranking;
+    }
+
+
+    @NonNull
+    @Override
+    public RankingViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+        LayoutInflater inflater = LayoutInflater.from(context);
+        View view = inflater.inflate(R.layout.ranking_row,parent,false);
+        return new RankingAdapter.RankingViewHolder(view);
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull RankingAdapter.RankingViewHolder holder, int position) {
+        holder.userNameTV.setText(users.get(position));
+        holder.pointsTV.setText(points.get(position));
+        holder.rankingTV.setText(" | " + ranking.get(position));
+    }
+
+    @Override
+    public int getItemCount() {
+        return users.size();
+    }
+
+    public static class RankingViewHolder extends RecyclerView.ViewHolder{
+        TextView userNameTV, pointsTV, rankingTV;
+        ConstraintLayout layout;
+
+        public RankingViewHolder(@NonNull View itemView) {
+            super(itemView);
+            userNameTV = itemView.findViewById(R.id.userNameTV);
+            pointsTV = itemView.findViewById(R.id.pointsTV);
+            rankingTV = itemView.findViewById(R.id.rankingTV);
+            layout = itemView.findViewById(R.id.singleUserLayout);
+        }
+    }
+}

+ 173 - 0
app/src/main/java/com/example/programingquiz/RegisterActivity.java

@@ -0,0 +1,173 @@
+package com.example.programingquiz;
+
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.Volley;
+import com.google.android.material.snackbar.Snackbar;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class RegisterActivity extends AppCompatActivity {
+
+    EditText userNameET, emailET, passwordET, rePasswordET;
+    Button createBtn, backBtn;
+
+    @Override
+    public void onBackPressed() {}
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_register);
+
+        userNameET = findViewById(R.id.userNameET);
+        emailET = findViewById(R.id.emailET);
+        passwordET = findViewById(R.id.passwordET);
+        rePasswordET = findViewById(R.id.rePasswordET);
+        createBtn = findViewById(R.id.createBtn);
+        backBtn = findViewById(R.id.backBtn);
+
+        createBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                String output = checkInputCorrectness();
+
+                if(output.equals("success")){
+                    registerUser();
+                }
+                else{
+                    Snackbar.make(findViewById(android.R.id.content), output, Snackbar.LENGTH_LONG).show();
+                }
+            }
+        });
+
+        backBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Intent intent = getIntent();
+                String prevActivity = intent.getStringExtra("prevActivity");
+
+                if(prevActivity.equals("start")){
+                    openStartActivity();
+                }
+                else if(prevActivity.equals("login")){
+                    openLoginActivity(null);
+                }
+            }
+        });
+    }
+
+    private void registerUser(){
+        JSONObject jsonObject = createJson(userNameET.getText().toString(), emailET.getText().toString(), passwordET.getText().toString());
+
+        String url = StartActivity.URL + "api/newUser";
+        RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
+
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.POST, url, jsonObject, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+
+                String result = "", status = "";
+
+                try {
+                    result = response.getString("result");
+                    status = response.getString("status");
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+
+                if(result.equals("success")){
+                    openLoginActivity("Account created");
+                }
+                else{
+                    Snackbar.make(findViewById(android.R.id.content), result + " : " + status, Snackbar.LENGTH_LONG).show();
+                }
+            }
+        }, new com.android.volley.Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+
+                Snackbar.make(findViewById(android.R.id.content), "some error occurred, please try again later", Snackbar.LENGTH_LONG).show();
+
+                String errorMsg = error.toString();
+                System.out.println(errorMsg);
+            }
+        });
+        queue.add(request);
+    }
+
+    private String checkInputCorrectness()
+    {
+        String result = "success";
+        if(userNameET.getText().toString().equals("")) {
+            result = "user name is required";
+        }
+        else if(emailET.getText().toString().equals("")){
+            result = "user email is required";
+        }
+        else if(passwordET.getText().toString().equals("")){
+            result = "password is required";
+        }
+        else if(rePasswordET.getText().toString().equals("")){
+            result = "password confirmation is required";
+        }
+
+        String regexPattern = "^(.+)@(.+)$";
+        Pattern pattern = Pattern.compile(regexPattern);
+        Matcher matcher = pattern.matcher(emailET.getText().toString());
+        if(!(matcher.matches()) && result.equals("success")){
+            result = "incorrect email address";
+        }
+
+        if(!(rePasswordET.getText().toString().equals(passwordET.getText().toString())) && result.equals("success")) {
+            result = "passwords must be the same";
+        }
+
+        return result;
+    }
+
+    private JSONObject createJson(String name, String email, String password){
+        JSONObject jsonObject = new JSONObject();
+
+        try {
+            jsonObject.put("email", email);
+            jsonObject.put("userName", name);
+            jsonObject.put("password", password);
+            jsonObject.put("score", 0);
+            jsonObject.put("id", 0);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+
+        return jsonObject;
+    }
+
+    private void openLoginActivity( String msg) {
+        Intent intent = new Intent(this, LoginActivity.class);
+        intent.putExtra("msg", msg);
+        startActivity(intent);
+    }
+
+    private void openStartActivity() {
+        Intent intent = new Intent(this, StartActivity.class);
+        startActivity(intent);
+    }
+
+}

+ 196 - 0
app/src/main/java/com/example/programingquiz/ReportActivity.java

@@ -0,0 +1,196 @@
+package com.example.programingquiz;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.content.res.AppCompatResources;
+import androidx.core.graphics.drawable.DrawableCompat;
+
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.view.Gravity;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.JsonObjectRequest;
+import com.android.volley.toolbox.Volley;
+import com.google.android.material.snackbar.Snackbar;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+
+public class ReportActivity extends AppCompatActivity {
+
+    TextView resultTV, pointsTV, questionTV, contentTV;
+    Button aBtn, bBtn, cBtn, dBtn, backBtn;
+
+    String login, taskCategory, userAnswer, aAnswer, bAnswer, cAnswer, dAnswer, correctAnswer;
+    LoginActivity.LoginType loginType;
+    CategoryActivity.DifficultyType difficultyType;
+
+    long taskID;
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_report);
+
+        questionTV = findViewById(R.id.questionTV);
+        contentTV = findViewById(R.id.contentTV);
+        pointsTV = findViewById(R.id.pointsTV);
+        resultTV = findViewById(R.id.resultTV);
+        aBtn = findViewById(R.id.aBtn);
+        bBtn = findViewById(R.id.bBtn);
+        cBtn = findViewById(R.id.cBtn);
+        dBtn = findViewById(R.id.dBtn);
+        backBtn = findViewById(R.id.backBtn);
+
+        backBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openMenuActivity();
+            }
+        });
+
+        getIntentExtras();
+        getAndSetData();
+    }
+
+
+    private void getAndSetData(){
+
+        aBtn.setText(aAnswer);
+        bBtn.setText(bAnswer);
+
+        if(cAnswer == null && dAnswer == null){
+            cBtn.setVisibility(View.INVISIBLE);
+            dBtn.setVisibility(View.INVISIBLE);
+        }
+        else{
+            cBtn.setText(cAnswer);
+            dBtn.setText(dAnswer);
+
+        }
+
+        String url = StartActivity.URL + "api/getTask/" + taskCategory + "/" + taskID;
+        RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+                try {
+                    questionTV.setText(response.getString("question"));
+                    contentTV.setText(response.getString("content").replace("\\n", "\n").replace("\\t", "\t"));
+                    correctAnswer = response.getString("correctAnswer");
+                    setUpResult();
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+            }
+        }, new com.android.volley.Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+                Snackbar.make(findViewById(android.R.id.content), "some error occurred, please try again later", Snackbar.LENGTH_LONG).show();
+
+                String errorMsg = error.toString();
+                System.out.println(errorMsg);
+            }
+        });
+        queue.add(request);
+
+    }
+
+    private void getIntentExtras(){
+        Intent intent = getIntent();
+        login = intent.getStringExtra("login");
+        loginType = (LoginActivity.LoginType) intent.getSerializableExtra("type");
+        difficultyType = (CategoryActivity.DifficultyType) intent.getSerializableExtra("difficultyType");
+        taskCategory = intent.getStringExtra("taskCategory").toLowerCase();
+        taskID = intent.getLongExtra("taskID",0);
+        userAnswer = intent.getStringExtra("userAnswer");
+        aAnswer = intent.getStringExtra("aAnswer");
+        bAnswer = intent.getStringExtra("bAnswer");
+        cAnswer = intent.getStringExtra("cAnswer");
+        dAnswer = intent.getStringExtra("dAnswer");
+    }
+
+    private void openMenuActivity(){
+        Intent intent = new Intent(this, MenuActivity.class);
+        intent.putExtra("login", login);
+        intent.putExtra("type", loginType);
+        startActivity(intent);
+    }
+
+    private void setUpResult(){
+
+        if(userAnswer.equals(correctAnswer)){
+            resultTV.setText("Correct");
+            resultTV.setTextColor(getResources().getColor(R.color.green));
+            pointsTV.setTextColor(getResources().getColor(R.color.green));
+            pointsTV.setText("+");
+        }
+        else{
+            resultTV.setText("Incorrect");
+            resultTV.setTextColor(getResources().getColor(R.color.red));
+            pointsTV.setTextColor(getResources().getColor(R.color.red));
+            pointsTV.setText("-");
+        }
+
+        String pointsTvText = pointsTV.getText().toString();
+        if(difficultyType == CategoryActivity.DifficultyType.BEGINNER){
+            pointsTvText += "10";
+        }
+        else{
+            pointsTvText += "20";
+        }
+        pointsTV.setText(pointsTvText);
+
+        setUpAnswersColors();
+        updatePlayerStatus();
+    }
+
+    private void setUpAnswersColors(){
+        aBtn.setBackground(getResources().getDrawable(R.drawable.incorrect_answer));
+        bBtn.setBackground(getResources().getDrawable(R.drawable.incorrect_answer));
+        cBtn.setBackground(getResources().getDrawable(R.drawable.incorrect_answer));
+        dBtn.setBackground(getResources().getDrawable(R.drawable.incorrect_answer));
+
+        if(correctAnswer.equals(aBtn.getText().toString())){
+            aBtn.setBackground(getResources().getDrawable(R.drawable.correct_answer));
+        }
+        else if(correctAnswer.equals(bBtn.getText().toString())){
+            bBtn.setBackground(getResources().getDrawable(R.drawable.correct_answer));
+        }
+        else if(correctAnswer.equals(cBtn.getText().toString())){
+            cBtn.setBackground(getResources().getDrawable(R.drawable.correct_answer));
+        }
+        else if(correctAnswer.equals(dBtn.getText().toString())){
+            dBtn.setBackground(getResources().getDrawable(R.drawable.correct_answer));
+        }
+    }
+
+    private void updatePlayerStatus(){
+        String url = StartActivity.URL + "api/updateScore/" + login + "/" + loginType + "/" + pointsTV.getText().toString();
+        RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
+        JsonObjectRequest request = new JsonObjectRequest(Request.Method.PUT, url, null, new Response.Listener<JSONObject>() {
+            @Override
+            public void onResponse(JSONObject response) {
+
+            }
+        }, new com.android.volley.Response.ErrorListener() {
+            @Override
+            public void onErrorResponse(VolleyError error) {
+
+            }
+        });
+        queue.add(request);
+    }
+
+}

+ 53 - 0
app/src/main/java/com/example/programingquiz/StartActivity.java

@@ -0,0 +1,53 @@
+package com.example.programingquiz;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.RadioGroup;
+import android.widget.Toast;
+
+import com.google.android.material.snackbar.Snackbar;
+
+public class StartActivity extends AppCompatActivity {
+
+    Button loginBtn, signupBtn;
+    public static final String URL = "http://192.168.50.119:8080/";
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_start);
+
+        signupBtn = findViewById(R.id.signupBtn);
+        loginBtn = findViewById(R.id.loginBtn);
+
+        signupBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openRegisterActivity();
+            }
+        });
+
+        loginBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                openLoginActivity();
+            }
+        });
+    }
+
+    private void openLoginActivity() {
+        Intent intent = new Intent(this, LoginActivity.class);
+        startActivity(intent);
+    }
+
+    private void openRegisterActivity() {
+        Intent intent = new Intent(this, RegisterActivity.class);
+        intent.putExtra("prevActivity", "start");
+        startActivity(intent);
+    }
+
+}

+ 30 - 0
app/src/main/res/drawable-v24/ic_launcher_foreground.xml

@@ -0,0 +1,30 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:aapt="http://schemas.android.com/aapt"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportWidth="108"
+    android:viewportHeight="108">
+    <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
+        <aapt:attr name="android:fillColor">
+            <gradient
+                android:endX="85.84757"
+                android:endY="92.4963"
+                android:startX="42.9492"
+                android:startY="49.59793"
+                android:type="linear">
+                <item
+                    android:color="#44000000"
+                    android:offset="0.0" />
+                <item
+                    android:color="#00000000"
+                    android:offset="1.0" />
+            </gradient>
+        </aapt:attr>
+    </path>
+    <path
+        android:fillColor="#FFFFFF"
+        android:fillType="nonZero"
+        android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000" />
+</vector>

+ 25 - 0
app/src/main/res/drawable-v24/icons8_google_96.xml

@@ -0,0 +1,25 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="96"
+    android:viewportHeight="96">
+  <path
+      android:pathData="M25.5,38.5C20.458,35.507 16.125,31.84 12.5,27.5C24.781,8.682 41.781,2.849 63.5,10C67.844,12.17 71.844,14.837 75.5,18C71.333,22.167 67.167,26.333 63,30.5C47.775,20.421 35.275,23.088 25.5,38.5Z"
+      android:fillColor="#e64034"/>
+  <path
+      android:pathData="M12.5,27.5C16.125,31.84 20.458,35.507 25.5,38.5C24.22,44.18 24.22,49.847 25.5,55.5C20.833,58.833 16.167,62.167 11.5,65.5C8.304,60.039 6.971,54.039 7.5,47.5C6.998,40.174 8.665,33.507 12.5,27.5Z"
+      android:strokeAlpha="0.965"
+      android:fillColor="#fabf2d"
+      android:fillAlpha="0.965"/>
+  <path
+      android:pathData="M75.5,76.5C70.951,74.131 66.785,71.131 63,67.5C62.536,66.906 62.369,66.239 62.5,65.5C65.167,64.833 66.833,63.167 67.5,60.5C67.751,58.83 68.418,57.33 69.5,56C62.174,55.5 54.841,55.334 47.5,55.5C47.5,50.167 47.5,44.833 47.5,39.5C60.833,39.5 74.167,39.5 87.5,39.5C89.787,54.067 85.787,66.4 75.5,76.5Z"
+      android:fillColor="#1d66be"/>
+  <path
+      android:pathData="M25.5,55.5C34.388,71.461 46.721,74.795 62.5,65.5C62.369,66.239 62.536,66.906 63,67.5C66.785,71.131 70.951,74.131 75.5,76.5C65.16,86.34 52.827,89.84 38.5,87C26,84.1 17,76.933 11.5,65.5C16.167,62.167 20.833,58.833 25.5,55.5Z"
+      android:fillColor="#55af4f"/>
+  <path
+      android:pathData="M67.5,60.5C66.833,63.167 65.167,64.833 62.5,65.5C63.833,63.5 65.5,61.833 67.5,60.5Z"
+      android:strokeAlpha="0.875"
+      android:fillColor="#658293"
+      android:fillAlpha="0.875"/>
+</vector>

+ 10 - 0
app/src/main/res/drawable/correct_answer.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <gradient
+        android:startColor="@color/green"
+        android:centerColor="@color/green"
+        android:endColor="@color/green"
+        android:angle="0" />
+    <corners android:radius="20dp"/>
+</shape>

+ 10 - 0
app/src/main/res/drawable/custom_button_1.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <gradient
+        android:startColor="@color/orange"
+        android:centerColor="@color/orange"
+        android:endColor="@color/orange"
+        android:angle="0" />
+    <corners android:radius="20dp"/>
+</shape>

+ 12 - 0
app/src/main/res/drawable/custom_input.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="40dp"
+    android:height="40dp"
+    android:viewportHeight="100"
+    android:viewportWidth="100">
+    <path
+        android:pathData="M0 100 L100 100"
+        android:strokeColor="@color/orange"
+        android:fillColor="@color/orange"
+        android:strokeWidth="10" />
+
+</vector>

+ 8 - 0
app/src/main/res/drawable/gradient_background.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <gradient
+        android:startColor="@color/black_fade_1"
+        android:endColor="@color/black_fade_2"
+        android:angle="90" />
+</shape>

+ 5 - 0
app/src/main/res/drawable/ic_baseline_email_24.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#F6C822"
+    android:viewportHeight="24" android:viewportWidth="24"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_baseline_lock_24.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#F6C822"
+    android:viewportHeight="24" android:viewportWidth="24"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_baseline_person_24.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#F6C822"
+    android:viewportHeight="24" android:viewportWidth="24"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_baseline_turn_left_24.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#000000"
+    android:viewportHeight="24" android:viewportWidth="24"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M6.83,11l1.59,1.59L7,14l-4,-4l4,-4l1.41,1.41L6.83,9L15,9c1.1,0 2,0.9 2,2v9h-2v-9L6.83,11z"/>
+</vector>

+ 170 - 0
app/src/main/res/drawable/ic_launcher_background.xml

@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportWidth="108"
+    android:viewportHeight="108">
+    <path
+        android:fillColor="#3DDC84"
+        android:pathData="M0,0h108v108h-108z" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M9,0L9,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,0L19,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,0L29,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,0L39,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,0L49,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,0L59,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,0L69,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,0L79,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M89,0L89,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M99,0L99,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,9L108,9"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,19L108,19"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,29L108,29"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,39L108,39"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,49L108,49"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,59L108,59"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,69L108,69"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,79L108,79"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,89L108,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,99L108,99"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,29L89,29"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,39L89,39"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,49L89,49"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,59L89,59"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,69L89,69"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,79L89,79"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,19L29,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,19L39,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,19L49,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,19L59,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,19L69,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,19L79,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+</vector>

+ 5 - 0
app/src/main/res/drawable/icons8_a.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="201"
+    android:viewportWidth="201" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M94.78,43.64l5.28,13.64l-18.48,45.54l40.04,0l-24.2,-60.28l-2.64,1.1z"/>
+    <path android:fillColor="#FF000000" android:pathData="M100.5,0C45,0 0,45 0,100.5s45,100.5 100.5,100.5 100.5,-45 100.5,-100.5S156,0 100.5,0ZM164.19,163.1c-3.6,3.67 -8.62,5.86 -15.07,6.6l-18.48,-41.8h-57.86l-18.7,41.8c-6.31,-0.74 -11.26,-2.93 -14.85,-6.6 -3.6,-3.66 -5.39,-8.28 -5.39,-13.86 0,-4.25 1.02,-8.65 3.08,-13.2L87.3,21.42c2.78,-6.45 7.62,-9.68 14.52,-9.68s11.51,3.23 14.3,9.68l50.38,114.62c2.05,4.84 3.08,9.24 3.08,13.2 0,5.58 -1.8,10.2 -5.39,13.86Z"/>
+</vector>

+ 6 - 0
app/src/main/res/drawable/icons8_b.xml

@@ -0,0 +1,6 @@
+<vector android:height="24dp" android:viewportHeight="201"
+    android:viewportWidth="201" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M100.5,0C45,0 0,45 0,100.5s45,100.5 100.5,100.5 100.5,-45 100.5,-100.5S156,0 100.5,0ZM165.77,151.83c-4.11,6.9 -9.83,12.25 -17.16,16.06 -7.33,3.82 -15.7,5.72 -25.08,5.72L59.95,173.61c-3.96,0 -7.41,-1.32 -10.34,-3.96 -2.94,-2.64 -4.4,-5.79 -4.4,-9.46L45.21,33.03c0,-3.66 1.43,-6.82 4.29,-9.46 2.86,-2.64 6.34,-3.96 10.45,-3.96h59.18c14.08,0 25.33,3.93 33.77,11.77 8.43,7.85 12.65,18.37 12.65,31.57 0,6.31 -1.69,12.29 -5.06,17.93 -3.38,5.65 -7.85,10.01 -13.42,13.09v0.66c7.62,2.64 13.67,6.97 18.15,12.98 4.47,6.02 6.71,12.91 6.71,20.68 0,8.8 -2.06,16.65 -6.16,23.54Z"/>
+    <path android:fillColor="#FF000000" android:pathData="M123.09,108.93h-49.28v39.82h49.28c6.01,0 10.78,-1.79 14.3,-5.39 3.52,-3.59 5.28,-8.54 5.28,-14.85s-1.73,-10.96 -5.17,-14.41c-3.45,-3.44 -8.25,-5.17 -14.41,-5.17Z"/>
+    <path android:fillColor="#FF000000" android:pathData="M131.12,78.35c3.44,-3.96 5.17,-8.72 5.17,-14.3 0,-6.01 -1.58,-10.78 -4.73,-14.3 -3.16,-3.52 -7.45,-5.28 -12.87,-5.28h-44.88v39.82h44.88c4.84,0 8.98,-1.98 12.43,-5.94Z"/>
+</vector>

+ 4 - 0
app/src/main/res/drawable/icons8_c.xml

@@ -0,0 +1,4 @@
+<vector android:height="24dp" android:viewportHeight="201"
+    android:viewportWidth="201" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M100.5,0C45,0 0,45 0,100.5s45,100.5 100.5,100.5 100.5,-45 100.5,-100.5S156,0 100.5,0ZM158.72,158.26c-5.58,6.82 -13.39,12.14 -23.43,15.95 -10.05,3.81 -21.53,5.72 -34.43,5.72s-24.68,-2.49 -34.87,-7.48c-10.2,-4.98 -18.15,-11.95 -23.87,-20.9 -5.72,-8.94 -8.58,-19.14 -8.58,-30.58v-40.48c0,-11.44 2.82,-21.59 8.47,-30.47 5.64,-8.87 13.45,-15.76 23.43,-20.68 9.97,-4.91 21.41,-7.37 34.32,-7.37s24.38,1.95 34.43,5.83c10.04,3.89 17.85,9.32 23.43,16.28 5.57,6.97 8.36,14.93 8.36,23.87 0,5.43 -1.8,9.72 -5.39,12.87 -3.6,3.16 -8.4,4.73 -14.41,4.73 -2.94,0 -6.16,-0.44 -9.68,-1.32 0.29,-3.52 0.44,-6.96 0.44,-10.34 0,-7.77 -3.45,-14.08 -10.34,-18.92 -6.9,-4.84 -15.84,-7.26 -26.84,-7.26s-19.69,3.05 -26.51,9.13c-6.82,6.09 -10.23,13.97 -10.23,23.65v40.48c0,9.83 3.52,17.82 10.56,23.98s16.13,9.24 27.28,9.24 19.94,-2.42 26.84,-7.26c6.89,-4.84 10.34,-11.07 10.34,-18.7 0,-3.52 -0.15,-6.89 -0.44,-10.12 3.66,-0.73 6.74,-1.1 9.24,-1.1 6.16,0 11.07,1.62 14.74,4.84 3.67,3.23 5.5,7.63 5.5,13.2 0,8.66 -2.79,16.39 -8.36,23.21Z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/icons8_d.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="201"
+    android:viewportWidth="201" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M135.63,57.83c-6.6,-5.72 -16.28,-8.58 -29.04,-8.58h-31.9v103.4h31.9c12.76,0 22.44,-2.89 29.04,-8.69 6.6,-5.79 9.9,-14.33 9.9,-25.63v-35.42c0,-11 -3.3,-19.36 -9.9,-25.08Z"/>
+    <path android:fillColor="#FF000000" android:pathData="M100.5,0C45,0 0,45 0,100.5s45,100.5 100.5,100.5 100.5,-45 100.5,-100.5S156,0 100.5,0ZM166.65,149.13c-5.58,9.09 -13.39,16.17 -23.43,21.23 -10.05,5.06 -21.53,7.59 -34.43,7.59L59.95,177.95c-4.11,0 -7.59,-1.28 -10.45,-3.85 -2.86,-2.56 -4.29,-5.75 -4.29,-9.57L45.21,37.37c0,-3.81 1.39,-7 4.18,-9.57 2.78,-2.56 6.3,-3.85 10.56,-3.85h48.84c13.05,0 24.6,2.5 34.65,7.48 10.04,4.99 17.82,11.99 23.32,21.01 5.5,9.02 8.25,19.33 8.25,30.91v34.76c0,11.59 -2.79,21.93 -8.36,31.02Z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/icons8_logout_24.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="96"
+    android:viewportWidth="96" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#000000"
+        android:pathData="M28.2,14.7c-0.7,0.3 -1.9,1.8 -2.7,3.3 -2.2,4.3 -2.2,55.8 0,60 2.1,4 6.4,5 22.5,5 23.1,-0 24,-0.8 24,-20.2l0,-12.2 -5.3,5.2c-5.4,5.3 -8.3,6.4 -9.4,3.6 -0.3,-0.9 0.7,-2.8 2.7,-4.9l3.3,-3.4 -12.4,-0.3 -12.4,-0.3 0,-2.5 0,-2.5 12.4,-0.3 12.4,-0.3 -3.3,-3.4c-2,-2.1 -3,-4 -2.7,-4.9 1.1,-2.8 4,-1.7 9.4,3.6l5.3,5.2 0,-12.2c0,-12.8 -1.1,-17.3 -4.5,-18.6 -2,-0.7 -37.4,-0.7 -39.3,0.1z" android:strokeColor="#00000000"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/icons8_play_button_circled_24.xml

@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:viewportHeight="90"
+    android:viewportWidth="90" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#000000"
+        android:pathData="M35.5,10.4c-10.7,3.4 -18.6,10.2 -23.2,20.1 -2.4,5.1 -2.8,7.3 -2.8,14.5 0,7.2 0.4,9.4 2.8,14.6 13,28.2 52.2,28.1 65.4,-0.1 2.4,-5.1 2.8,-7.3 2.8,-14.5 0,-7.2 -0.4,-9.4 -2.8,-14.5 -3,-6.5 -8.1,-12.4 -13.8,-16 -7.8,-5 -19.9,-6.8 -28.4,-4.1zM51.8,38.5c5.6,3.2 10.2,6.1 10.2,6.5 0,0.9 -24.4,14.8 -25.2,14.3 -1,-0.5 -1.1,-27.7 -0.1,-28.6 0.3,-0.4 1.6,-0.1 2.7,0.6 1.2,0.7 6.7,4 12.4,7.2z" android:strokeColor="#00000000"/>
+</vector>

+ 30 - 0
app/src/main/res/drawable/icons8_ranking_24.xml

@@ -0,0 +1,30 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="66"
+    android:viewportHeight="66">
+  <path
+      android:pathData="M30.5,6.9c-1,2 -2.4,3.1 -4.1,3.3 -4.2,0.5 -5.3,3.2 -2.5,6.2 1.8,1.9 2.1,3.1 1.7,5.4 -1,4.1 1.3,5.9 5.4,4.2 2.4,-1 3.7,-1 5.7,-0.1 3.4,1.6 5.6,-0.2 5.1,-4.1 -0.3,-1.8 0.2,-3.4 1.4,-4.5 3.5,-3.2 1.9,-7.3 -3,-7.3 -0.9,-0 -2.5,-1.4 -3.4,-3 -2.2,-3.8 -4.3,-3.8 -6.3,-0.1z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M10,22c-0.6,1.1 -2.2,2.3 -3.5,2.6 -2.7,0.7 -3.3,3.2 -1.3,5.2 0.7,0.7 1.2,2.4 1.3,4 0,2.3 0.4,2.7 2.5,2.4 3.1,-0.3 3.9,-0.3 7,-0 2.1,0.3 2.5,-0.1 2.5,-2.4 0,-1.5 0.6,-3.3 1.3,-3.9 2,-2.1 1.4,-4.6 -1.3,-5.3 -1.3,-0.3 -2.9,-1.5 -3.5,-2.6 -0.6,-1.1 -1.7,-2 -2.5,-2 -0.8,-0 -1.9,0.9 -2.5,2z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M51,22c-0.6,1.1 -2.2,2.3 -3.5,2.6 -2.7,0.7 -3.3,3.2 -1.3,5.2 0.7,0.7 1.2,2.4 1.3,4 0,2.3 0.4,2.7 2.5,2.4 3.1,-0.3 3.9,-0.3 7,-0 2.1,0.3 2.5,-0.1 2.5,-2.4 0.1,-1.6 0.6,-3.3 1.3,-4 2,-2 1.4,-4.5 -1.3,-5.2 -1.3,-0.3 -2.9,-1.5 -3.5,-2.6 -0.6,-1.1 -1.7,-2 -2.5,-2 -0.8,-0 -1.9,0.9 -2.5,2z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M25.5,36.3c-0.3,0.7 -0.4,6.7 -0.3,13.3l0.3,11.9 7.5,-0 7.5,-0 0,-13 0,-13 -7.3,-0.3c-5.4,-0.2 -7.4,0.1 -7.7,1.1zM34.8,42.8c0.3,1.7 -0.2,2.2 -1.7,2.2 -1.4,-0 -2.1,-0.6 -2.1,-1.8 0,-3.8 3.3,-4.1 3.8,-0.4z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M46.6,43.2c-1.1,4.1 -0.6,15.4 0.7,17.2 1,1.4 2.5,1.6 7.7,1.4l6.5,-0.3 0,-10 0,-10 -7.1,-0.3c-6.7,-0.3 -7.2,-0.1 -7.8,2zM56.8,48.3c0.4,2 -2.5,3.4 -4,1.9 -1.5,-1.5 -0.1,-4.4 1.9,-4 1,0.2 1.9,1.1 2.1,2.1z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+  <path
+      android:pathData="M4.4,45.3c-0.3,0.8 -0.4,4.7 -0.2,8.8l0.3,7.4 6.5,0.3c7.8,0.4 9,-0.7 9,-8.6 0,-8.3 -0.9,-9.2 -8.6,-9.2 -4.5,-0 -6.6,0.4 -7,1.3zM13.8,51.3c0.4,2.1 -2.5,3.4 -4,1.9 -0.8,-0.8 -0.8,-1.6 0.2,-2.7 1.6,-1.9 3.4,-1.5 3.8,0.8z"
+      android:fillColor="#000000"
+      android:strokeColor="#00000000"/>
+</vector>

+ 10 - 0
app/src/main/res/drawable/incorrect_answer.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <gradient
+        android:startColor="@color/red"
+        android:centerColor="@color/red"
+        android:endColor="@color/red"
+        android:angle="0" />
+    <corners android:radius="20dp"/>
+</shape>

+ 15 - 0
app/src/main/res/drawable/menu_player_info_box.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <solid
+        android:color="@color/black"/>
+
+    <corners
+        android:radius="50dp"/>
+
+    <stroke
+        android:width="5sp"
+        android:color="@color/beige"/>
+
+</shape>

+ 8 - 0
app/src/main/res/drawable/orange_out_line.xml

@@ -0,0 +1,8 @@
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+  <corners android:radius="2dp" />
+  <solid android:color="@color/orange" />
+  <stroke
+      android:width="1dp"
+      android:color="@color/orange" />
+</shape>

+ 6 - 0
app/src/main/res/drawable/toggle_widget_background.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+  <item android:drawable="@color/dark_orange" android:state_checked="true" />
+  <item android:drawable="@color/orange" android:state_pressed="true" />
+  <item android:drawable="@color/trans" />
+</selector>

+ 12 - 0
app/src/main/res/drawable/trapeze_bottom.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="100dp"
+    android:height="100dp"
+    android:viewportHeight="100"
+    android:viewportWidth="100">
+    <path
+        android:pathData="M0 100 L100 100 L80 0 L20 0"
+        android:strokeColor="@color/orange"
+        android:fillColor="@color/orange"
+        android:strokeWidth="2" />
+
+</vector>

+ 12 - 0
app/src/main/res/drawable/trapeze_left.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="100dp"
+    android:height="100dp"
+    android:viewportHeight="100"
+    android:viewportWidth="100">
+    <path
+        android:pathData="M0 0 L0 100 L100 80 L100 20"
+        android:strokeColor="@color/orange"
+        android:fillColor="@color/orange"
+        android:strokeWidth="2" />
+
+</vector>

+ 12 - 0
app/src/main/res/drawable/trapeze_right.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="100dp"
+    android:height="100dp"
+    android:viewportHeight="100"
+    android:viewportWidth="100">
+    <path
+        android:pathData="M100 0 L100 100 L0 80 L0 20"
+        android:strokeColor="@color/orange"
+        android:fillColor="@color/orange"
+        android:strokeWidth="2" />
+
+</vector>

BIN=BIN
app/src/main/res/font/k2d_bold.ttf


BIN=BIN
app/src/main/res/font/k2d_semi_bold.ttf


+ 322 - 0
app/src/main/res/layout/activity_advanced_task.xml

@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".AdvancedTaskActivity"
+    android:orientation="vertical"
+
+    android:background="@color/black">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+
+        android:layout_margin="20dp"
+        app:cardCornerRadius="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/gradient_background"
+
+            android:orientation="vertical"
+            android:weightSum="3">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1.6"
+                android:weightSum="3"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="0.35"
+                    android:weightSum="2">
+
+                </LinearLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="2.3">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_marginBottom="20dp"
+                        android:background="@drawable/menu_player_info_box"
+
+                        android:layout_marginTop="30dp"
+
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent">
+
+                        <TextView
+                            android:id="@+id/questionTV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginTop="20dp"
+
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintTop_toTopOf="parent"
+
+                            android:text="Question of the task"
+                            android:textAlignment="center"
+                            android:textSize="20sp"
+                            android:textColor="@color/white"
+                            android:fontFamily="@font/k2d_bold" />
+
+                        <TextView
+                            android:id="@+id/contentTV"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginBottom="25dp"
+                            android:layout_marginStart="15dp"
+                            android:layout_marginEnd="15dp"
+
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintTop_toBottomOf="@+id/questionTV"
+
+                            android:text="#include stdio.h\n\nint main(void)\n{\n\t\tconst int a = 5;\n\t\ta++;\n\t\tprintf(”%d”, a);\n\t\treturn 0;\n}"
+                            android:textAlignment="viewStart"
+                            android:textColor="@color/orange"
+                            android:fontFamily="@font/k2d_bold" />
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="0.35"
+                    android:weightSum="2">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.5" />
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="1"
+
+                        android:background="@drawable/trapeze_right"/>
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.5" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1.4"
+                android:weightSum="3"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="0.35"
+                    android:weightSum="2">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="0dp"
+                        android:layout_weight="2"
+
+                        android:layout_marginBottom="50dp"
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_left"/>
+
+
+                </LinearLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="2.3">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:background="@drawable/menu_player_info_box"
+
+                        android:layout_marginBottom="20dp"
+
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent">
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/aBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+                            android:layout_marginBottom="20dp"
+
+                            app:layout_constraintVertical_chainStyle="packed"
+
+                            app:layout_constraintBottom_toTopOf="@+id/bBtn"
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_a"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer 1"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/bBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+                            android:layout_marginBottom="20dp"
+
+                            app:layout_constraintVertical_chainStyle="packed"
+
+                            app:layout_constraintBottom_toTopOf="@+id/cBtn"
+                            app:layout_constraintTop_toBottomOf="@+id/aBtn"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_b"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer 2"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/cBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+                            android:layout_marginBottom="20dp"
+
+
+                            app:layout_constraintVertical_chainStyle="packed"
+
+                            app:layout_constraintBottom_toTopOf="@+id/dBtn"
+                            app:layout_constraintTop_toBottomOf="@+id/bBtn"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_c"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer 3"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/dBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+
+                            app:layout_constraintVertical_chainStyle="packed"
+
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintTop_toBottomOf="@+id/cBtn"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_d"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer 4"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="0.35"
+                    android:weightSum="2">
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</LinearLayout>

+ 262 - 0
app/src/main/res/layout/activity_beginner_task.xml

@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".BeginnerTaskActivity"
+    android:orientation="vertical"
+
+    android:background="@color/black">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+
+        android:layout_margin="20dp"
+        app:cardCornerRadius="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/gradient_background"
+
+            android:orientation="vertical"
+            android:weightSum="3">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1.8"
+                android:weightSum="3"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="0.35"
+                    android:weightSum="2">
+
+                </LinearLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="2.3">
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_marginBottom="20dp"
+                    android:background="@drawable/menu_player_info_box"
+
+                    android:layout_marginTop="30dp"
+
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintBottom_toBottomOf="parent">
+
+                    <TextView
+                        android:id="@+id/questionTV"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+
+                        android:layout_marginTop="20dp"
+
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+
+                        android:text="Question of the task"
+                        android:textAlignment="center"
+                        android:textSize="20sp"
+                        android:textColor="@color/white"
+                        android:fontFamily="@font/k2d_bold" />
+
+                    <TextView
+                        android:id="@+id/contentTV"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+
+                        android:layout_marginBottom="25dp"
+                        android:layout_marginStart="15dp"
+                        android:layout_marginEnd="15dp"
+
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintTop_toBottomOf="@+id/questionTV"
+
+                        android:text="#include stdio.h\n\nint main(void)\n{\n\t\tconst int a = 5;\n\t\ta++;\n\t\tprintf(”%d”, a);\n\t\treturn 0;\n}"
+                        android:textAlignment="viewStart"
+                        android:textColor="@color/orange"
+                        android:fontFamily="@font/k2d_bold" />
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="0.35"
+                    android:weightSum="2">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.5" />
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="1"
+
+                        android:background="@drawable/trapeze_right"/>
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.5" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1.2"
+                android:weightSum="3"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="0.35"
+                    android:weightSum="2">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="0dp"
+                        android:layout_weight="2"
+
+                        android:layout_marginBottom="50dp"
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_left"/>
+
+
+                </LinearLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="2.3">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:background="@drawable/menu_player_info_box"
+
+                        android:layout_marginTop="20dp"
+                        android:layout_marginBottom="50dp"
+
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent">
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/aBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+                            android:layout_marginBottom="25dp"
+
+                            app:layout_constraintVertical_chainStyle="packed"
+
+                            app:layout_constraintBottom_toTopOf="@+id/bBtn"
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_a"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer 2"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/bBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+
+                            app:layout_constraintVertical_chainStyle="packed"
+
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintTop_toBottomOf="@+id/aBtn"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_b"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer 1"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:layout_weight="0.35"
+                    android:weightSum="2">
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</LinearLayout>

+ 325 - 0
app/src/main/res/layout/activity_category.xml

@@ -0,0 +1,325 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".MenuActivity"
+    android:orientation="vertical"
+
+    android:background="@color/black">
+
+        <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+
+        android:layout_margin="20dp"
+        app:cardCornerRadius="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/gradient_background"
+
+            android:orientation="vertical"
+            android:weightSum="3">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="0.8">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:weightSum="2">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="1.3"
+
+                        android:layout_marginTop="20dp">
+
+                        <TextView
+                            android:id="@+id/titleTV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:layout_constraintBottom_toTopOf="@+id/cardInfoTV"
+
+                            android:text="Choose"
+                            android:textSize="45sp"
+                            android:textColor="@color/white"
+                            android:fontFamily="@font/k2d_semi_bold" />
+
+                        <TextView
+                            android:id="@+id/cardInfoTV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+
+                            android:text="Category"
+                            android:textSize="25sp"
+                            android:textColor="@color/white"
+                            android:fontFamily="@font/k2d_semi_bold" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintTop_toBottomOf="@+id/cardInfoTV"
+
+                            android:text="Level Difficulty"
+                            android:textSize="20sp"
+                            android:textColor="@color/orange"
+                            android:fontFamily="@font/k2d_semi_bold" />
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.7"
+                        android:orientation="horizontal">
+
+                        <RadioGroup
+                            android:id="@+id/toggle"
+
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintTop_toTopOf="parent"
+
+                            android:checkedButton="@+id/beginner"
+
+                            android:layout_marginLeft="50dp"
+                            android:layout_marginRight="50dp"
+                            android:layout_marginTop="10dp"
+                            android:layout_marginBottom="10dp"
+
+                            android:background="@drawable/orange_out_line"
+                            android:orientation="horizontal"
+                            >
+
+                            <RadioButton
+                                android:id="@+id/beginner"
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+
+                                android:layout_marginTop="1dp"
+                                android:layout_marginBottom="1dp"
+                                android:layout_marginLeft="1dp"
+
+                                android:button="@null"
+                                android:gravity="center"
+                                android:text="Beginner"
+                                android:fontFamily="@font/k2d_bold"
+                                android:textColor="@color/black"
+
+                                android:background="@drawable/toggle_widget_background" />
+
+                            <RadioButton
+                                android:id="@+id/advanced"
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+
+                                android:layout_marginRight="1dp"
+                                android:layout_marginTop="1dp"
+                                android:layout_marginBottom="1dp"
+
+                                android:button="@null"
+                                android:gravity="center"
+                                android:text="Advanced"
+                                android:fontFamily="@font/k2d_bold"
+                                android:textColor="@color/black"
+
+                                android:background="@drawable/toggle_widget_background" />
+                        </RadioGroup>
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                </LinearLayout>
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="2.2"
+                android:weightSum="3"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35"
+                    android:weightSum="3"
+                    android:orientation="vertical">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="0dp"
+                        android:layout_weight="1.2"
+                        />
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:id="@+id/trapezeTopLeft"
+                        android:layout_width="wrap_content"
+                        android:layout_height="0dp"
+                        android:layout_weight="1"
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_left"/>
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="2.3"
+                    android:weightSum="2"
+                    android:orientation="vertical">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="1.7"
+                        android:orientation="horizontal">
+
+                        <androidx.cardview.widget.CardView
+                            android:id="@+id/mainCardView"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            app:cardCornerRadius="50dp">
+
+                            <androidx.constraintlayout.widget.ConstraintLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:background="@color/beige">
+
+                            </androidx.constraintlayout.widget.ConstraintLayout>
+
+                            <androidx.cardview.widget.CardView
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:layout_margin="5dp"
+                                app:cardCornerRadius="50dp">
+
+                                <androidx.constraintlayout.widget.ConstraintLayout
+                                    android:layout_width="match_parent"
+                                    android:layout_height="match_parent"
+                                    android:background="@color/black">
+
+                                    <androidx.recyclerview.widget.RecyclerView
+                                        android:id="@+id/categoriesRecycleView"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="0dp"
+
+                                        android:layout_marginTop="10dp"
+                                        android:layout_marginBottom="10dp"
+                                        android:layout_marginStart="20dp"
+                                        android:layout_marginEnd="20dp"
+
+                                        android:scrollbars="vertical"
+                                        app:layout_constraintEnd_toEndOf="parent"
+                                        app:layout_constraintStart_toStartOf="parent"
+                                        app:layout_constraintTop_toTopOf="parent"
+                                        app:layout_constraintBottom_toBottomOf="parent">
+
+                                    </androidx.recyclerview.widget.RecyclerView>
+
+
+                                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                            </androidx.cardview.widget.CardView>
+
+                        </androidx.cardview.widget.CardView>
+
+
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.3"
+                        android:orientation="horizontal"
+                        android:gravity="center">
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/backBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+
+                            android:layout_marginEnd="25dp"
+                            android:layout_marginStart="25dp"
+
+                            android:drawableStart="@drawable/ic_baseline_turn_left_24"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="60dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Back"
+                            android:textAlignment="textStart"
+                            android:textSize="20dp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                    </LinearLayout>
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35"
+                    android:weightSum="3"
+                    android:orientation="vertical">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:id="@+id/trapezeTopRight"
+                        android:layout_width="wrap_content"
+                        android:layout_height="0dp"
+                        android:layout_weight="1"
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_right"/>
+
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</LinearLayout>

+ 352 - 0
app/src/main/res/layout/activity_login.xml

@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".StartActivity"
+    android:orientation="vertical"
+
+    android:background="@color/black">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+
+        android:layout_margin="20dp"
+        app:cardCornerRadius="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/gradient_background"
+
+            android:orientation="vertical"
+            android:weightSum="3">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="0.7">
+
+                <TextView
+                    android:id="@+id/titleTV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+
+                    android:text="Welcome Back"
+                    android:textSize="45dp"
+                    android:textColor="@color/white"
+                    android:fontFamily="@font/k2d_semi_bold"
+
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintBottom_toBottomOf="@+id/cardInfoTV"/>
+
+                <TextView
+                    android:id="@+id/cardInfoTV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+
+                    android:text="Login to your account"
+                    android:textSize="20dp"
+                    android:textColor="@color/white"
+                    android:fontFamily="@font/k2d_semi_bold"
+
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/titleTV"
+                    app:layout_constraintBottom_toBottomOf="parent"/>
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="2.3"
+                android:weightSum="3"
+                android:orientation="horizontal"
+                >
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:orientation="vertical"
+                        android:weightSum="2">
+
+                        <com.google.android.material.imageview.ShapeableImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="0dp"
+
+                            android:layout_marginTop="30dp"
+                            android:layout_marginBottom="30dp"
+
+                            android:layout_weight="1"
+
+                            android:background="@drawable/trapeze_left"/>
+
+                        <com.google.android.material.imageview.ShapeableImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="0dp"
+
+                            android:layout_marginTop="30dp"
+                            android:layout_marginBottom="100dp"
+
+                            android:layout_weight="1"
+
+                            android:background="@drawable/trapeze_left"/>
+
+                    </LinearLayout>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="2.3">
+
+                    <androidx.cardview.widget.CardView
+                        android:id="@+id/mainCardView"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_marginBottom="80dp"
+                        app:cardCornerRadius="50dp">
+
+                        <androidx.constraintlayout.widget.ConstraintLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:background="@color/beige">
+
+                        </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        <androidx.cardview.widget.CardView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_margin="5dp"
+                            app:cardCornerRadius="50dp">
+
+                            <androidx.constraintlayout.widget.ConstraintLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:background="@color/black"
+                                >
+
+                                <LinearLayout
+                                    android:id="@+id/mainTop"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:orientation="vertical"
+
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintTop_toTopOf="parent">
+
+                                    <EditText
+                                        android:id="@+id/loginET"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+
+                                        android:layout_marginTop="50dp"
+                                        android:layout_marginStart="30dp"
+                                        android:layout_marginEnd="30dp"
+
+                                        android:drawableStart="@drawable/ic_baseline_person_24"
+                                        android:drawablePadding="12dp"
+
+                                        android:background="@drawable/custom_input"
+
+                                        android:inputType="textPersonName"
+
+                                        android:autofillHints=""
+                                        android:hint="UserName/Email"
+                                        android:textColor="@color/white"
+
+                                        android:textColorHint="@color/white" />
+
+                                    <EditText
+                                        android:id="@+id/passwordET"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+
+                                        android:layout_marginTop="30dp"
+                                        android:layout_marginStart="30dp"
+                                        android:layout_marginEnd="30dp"
+
+                                        android:drawableStart="@drawable/ic_baseline_lock_24"
+                                        android:drawablePadding="12dp"
+
+                                        android:background="@drawable/custom_input"
+
+                                        android:inputType="textPassword"
+
+                                        android:autofillHints=""
+                                        android:hint="Password"
+                                        android:textColor="@color/white"
+
+                                        android:textColorHint="@color/white" />
+
+                                    <androidx.appcompat.widget.AppCompatButton
+                                        android:id="@+id/LoginBtn"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+
+                                        android:layout_marginTop="50dp"
+                                        android:layout_marginEnd="40dp"
+                                        android:layout_marginStart="40dp"
+
+
+                                        android:text="Login"
+                                        android:textSize="20dp"
+                                        android:textColor="@color/black"
+                                        android:fontFamily="@font/k2d_semi_bold"
+
+                                        android:background="@drawable/custom_button_1"/>
+
+
+                                </LinearLayout>
+
+                                <LinearLayout
+                                    android:id="@+id/mainBottom"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:orientation="vertical"
+
+                                    app:layout_constraintTop_toBottomOf="@+id/mainTop"
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintBottom_toBottomOf="parent">
+
+                                    <LinearLayout
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:orientation="horizontal">
+
+                                        <TextView
+                                            android:layout_width="wrap_content"
+                                            android:layout_height="wrap_content"
+
+                                            android:text="Dont't have an account?"
+                                            android:fontFamily="@font/k2d_semi_bold"
+                                            android:textSize="15dp"
+                                            />
+
+                                        <EditText
+                                            android:id="@+id/signupHyperLink"
+                                            android:layout_width="wrap_content"
+                                            android:layout_height="wrap_content"
+
+                                            android:fontFamily="@font/k2d_bold"
+                                            android:text="Sign up"
+                                            android:textSize="15dp"
+
+                                            android:focusable="false"
+                                            android:clickable="false"
+                                            />
+
+                                    </LinearLayout>
+
+                                    <TextView
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+
+                                        android:fontFamily="@font/k2d_semi_bold"
+                                        android:textAlignment="center"
+                                        android:text="or"
+                                        android:textSize="15dp"
+                                        />
+
+                                <LinearLayout
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:orientation="horizontal">
+
+                                    <ImageView
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+
+                                        android:layout_gravity="center"
+
+                                        app:srcCompat="@drawable/icons8_google_96" />
+
+                                    <EditText
+                                        android:id="@+id/signUpWithGoogleET"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+
+
+
+                                        android:background="@drawable/custom_input"
+
+                                        android:hint="Sign up with Google"
+                                        android:textSize="15dp"
+                                        android:fontFamily="@font/k2d_semi_bold"
+                                        android:textColor="@color/white"
+                                        android:textColorHint="@color/white"
+
+                                        android:focusable="false"
+                                        android:clickable="false"/>
+
+                                </LinearLayout>
+
+                                </LinearLayout>
+
+                            </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        </androidx.cardview.widget.CardView>
+
+                    </androidx.cardview.widget.CardView>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:orientation="vertical"
+                        android:weightSum="2">
+
+                        <com.google.android.material.imageview.ShapeableImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="0dp"
+
+                            android:layout_marginTop="30dp"
+                            android:layout_marginBottom="30dp"
+
+                            android:layout_weight="1"
+
+                            android:background="@drawable/trapeze_right"/>
+
+                        <com.google.android.material.imageview.ShapeableImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="0dp"
+
+                            android:layout_marginTop="30dp"
+                            android:layout_marginBottom="100dp"
+
+                            android:layout_weight="1"
+
+                            android:background="@drawable/trapeze_right"/>
+
+                    </LinearLayout>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</LinearLayout>

+ 46 - 0
app/src/main/res/layout/activity_main.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".MainActivity">
+
+    <com.google.android.gms.common.SignInButton
+        android:id="@+id/loginButton"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:colorScheme="dark"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/logoutButton"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="end|bottom"
+        android:layout_marginEnd="20dp"
+        android:layout_marginBottom="20dp"
+        android:clickable="true"
+        android:contentDescription="Logout"
+        android:focusable="true"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:srcCompat="@android:drawable/ic_lock_power_off" />
+
+    <Button
+        android:id="@+id/actionButton"
+
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+
+        app:layout_constraintTop_toBottomOf="@+id/loginButton"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+
+        android:text="ACTION"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 388 - 0
app/src/main/res/layout/activity_menu.xml

@@ -0,0 +1,388 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".MenuActivity"
+    android:orientation="vertical"
+
+    android:background="@color/black">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+
+        android:layout_margin="20dp"
+        app:cardCornerRadius="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/gradient_background"
+
+            android:orientation="vertical"
+            android:weightSum="3">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1.2">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:weightSum="2">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.8"
+
+                        android:layout_marginTop="20dp">
+
+                        <TextView
+                            android:id="@+id/titleTV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:layout_constraintBottom_toTopOf="@+id/cardInfoTV"
+
+                            android:text="Programming"
+                            android:textSize="45sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold" />
+
+                        <TextView
+                            android:id="@+id/cardInfoTV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginEnd="50dp"
+
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintHorizontal_chainStyle="packed"
+
+                            android:text="Quiz"
+                            android:textSize="25sp"
+                            android:textColor="@color/white"
+                            android:fontFamily="@font/k2d_semi_bold" />
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1.2"
+                    android:weightSum="3"
+                    android:orientation="horizontal">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="0.35">
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:orientation="vertical"
+                            android:weightSum="2">
+
+                            <com.google.android.material.imageview.ShapeableImageView
+                                android:layout_width="wrap_content"
+                                android:layout_height="0dp"
+
+                                android:layout_weight="2"
+
+                                android:layout_marginTop="20dp"
+                                android:layout_marginBottom="40dp"
+
+                                android:background="@drawable/trapeze_left"/>
+
+                        </LinearLayout>
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        <androidx.constraintlayout.widget.ConstraintLayout
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="2.3"
+
+                            android:layout_marginBottom="20dp"
+
+                            android:background="@drawable/menu_player_info_box">
+
+                            <TextView
+                                android:id="@+id/welcomeTV"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintTop_toTopOf="parent"
+                                app:layout_constraintBottom_toTopOf="@+id/usernameTV"
+
+                                android:text="Good to see you back"
+                                android:textSize="20sp"
+                                android:textColor="@color/white"
+                                android:fontFamily="@font/k2d_bold" />
+
+                            <TextView
+                                android:id="@+id/usernameTV"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintTop_toBottomOf="@+id/welcomeTV"
+                                app:layout_constraintBottom_toTopOf="@+id/userPointsTV"
+
+
+                                android:text="Name: testUserName"
+                                android:textSize="15sp"
+                                android:textColor="@color/orange"
+                                android:fontFamily="@font/k2d_semi_bold" />
+
+                            <TextView
+                                android:id="@+id/userPointsTV"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintTop_toBottomOf="@+id/usernameTV"
+                                app:layout_constraintBottom_toTopOf="@+id/userRankingTV"
+
+                                android:text="Score: 00000000000"
+                                android:textSize="15sp"
+                                android:textColor="@color/orange"
+                                android:fontFamily="@font/k2d_semi_bold" />
+
+                            <TextView
+                                android:id="@+id/userRankingTV"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintTop_toBottomOf="@+id/userPointsTV"
+                                app:layout_constraintBottom_toBottomOf="parent"
+
+
+                                android:text="Ranking position: 1"
+                                android:textSize="15sp"
+                                android:textColor="@color/orange"
+                                android:fontFamily="@font/k2d_semi_bold" />
+
+                        </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        <androidx.constraintlayout.widget.ConstraintLayout
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="0.35">
+
+
+                        </androidx.constraintlayout.widget.ConstraintLayout>
+
+                    </LinearLayout>
+
+                </LinearLayout>
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1.8"
+                android:weightSum="3"
+                android:orientation="horizontal"
+                >
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:orientation="vertical"
+                        android:weightSum="2">
+
+                        <com.google.android.material.imageview.ShapeableImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="0dp"
+
+                            android:layout_marginTop="150dp"
+                            android:layout_marginBottom="20dp"
+
+                            android:layout_weight="2"
+
+                            android:background="@drawable/trapeze_left"/>
+
+                    </LinearLayout>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="2.3">
+
+                    <androidx.cardview.widget.CardView
+                        android:id="@+id/mainCardView"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_marginBottom="20dp"
+                        app:cardCornerRadius="50dp">
+
+                        <androidx.constraintlayout.widget.ConstraintLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:background="@color/beige">
+
+                        </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        <androidx.cardview.widget.CardView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_margin="5dp"
+                            app:cardCornerRadius="50dp">
+
+                            <androidx.constraintlayout.widget.ConstraintLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:background="@color/black">
+
+                                <androidx.appcompat.widget.AppCompatButton
+                                    android:id="@+id/startBtn"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginTop="50dp"
+                                    android:layout_marginEnd="40dp"
+                                    android:layout_marginStart="40dp"
+
+                                    app:layout_constraintTop_toTopOf="parent"
+                                    app:layout_constraintBottom_toTopOf="@+id/rankingBtn"
+                                    app:layout_constraintStart_toStartOf="parent"
+                                    app:layout_constraintEnd_toEndOf="parent"
+
+                                    android:drawableStart="@drawable/icons8_play_button_circled_24"
+                                    android:drawablePadding="5dp"
+                                    android:paddingStart="10dp"
+                                    android:paddingEnd="0dp"
+
+                                    android:textAllCaps="false"
+
+                                    android:text="Start"
+                                    android:textAlignment="viewStart"
+                                    android:textSize="20sp"
+                                    android:textColor="@color/black"
+                                    android:fontFamily="@font/k2d_semi_bold"
+
+                                    android:background="@drawable/custom_button_1"/>
+
+                                <androidx.appcompat.widget.AppCompatButton
+                                    android:id="@+id/rankingBtn"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginTop="20dp"
+                                    android:layout_marginEnd="40dp"
+                                    android:layout_marginStart="40dp"
+
+                                    app:layout_constraintTop_toBottomOf="@+id/startBtn"
+                                    app:layout_constraintStart_toStartOf="parent"
+                                    app:layout_constraintEnd_toEndOf="parent"
+
+                                    android:drawableStart="@drawable/icons8_ranking_24"
+                                    android:drawablePadding="5dp"
+                                    android:paddingStart="10dp"
+                                    android:paddingEnd="0dp"
+
+                                    android:textAllCaps="false"
+
+                                    android:text="Ranking"
+                                    android:textAlignment="viewStart"
+                                    android:textSize="20sp"
+                                    android:textColor="@color/black"
+                                    android:fontFamily="@font/k2d_semi_bold"
+
+                                    android:background="@drawable/custom_button_1"/>
+
+                                <androidx.appcompat.widget.AppCompatButton
+                                    android:id="@+id/logOutBtn"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginBottom="30dp"
+                                    android:layout_marginEnd="40dp"
+                                    android:layout_marginStart="40dp"
+
+                                    app:layout_constraintBottom_toBottomOf="parent"
+                                    app:layout_constraintStart_toStartOf="parent"
+                                    app:layout_constraintEnd_toEndOf="parent"
+
+                                    android:drawableStart="@drawable/icons8_logout_24"
+                                    android:drawablePadding="5dp"
+                                    android:paddingStart="10dp"
+                                    android:paddingEnd="0dp"
+
+                                    android:textAllCaps="false"
+
+                                    android:text="Logout"
+                                    android:textAlignment="viewStart"
+                                    android:textSize="20sp"
+                                    android:textColor="@color/black"
+                                    android:fontFamily="@font/k2d_semi_bold"
+
+                                    android:background="@drawable/custom_button_1"/>
+
+                            </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        </androidx.cardview.widget.CardView>
+
+                    </androidx.cardview.widget.CardView>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:orientation="vertical"
+                        android:weightSum="2">
+
+
+                        <com.google.android.material.imageview.ShapeableImageView
+                            android:layout_width="wrap_content"
+                            android:layout_height="0dp"
+
+                            android:layout_marginBottom="200dp"
+
+                            android:layout_weight="2"
+
+                            android:background="@drawable/trapeze_right"/>
+
+                    </LinearLayout>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</LinearLayout>

+ 327 - 0
app/src/main/res/layout/activity_ranking.xml

@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".RankingActivity"
+    android:orientation="vertical"
+
+    android:background="@color/black">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+
+        android:layout_margin="20dp"
+        app:cardCornerRadius="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/gradient_background"
+
+            android:orientation="vertical"
+            android:weightSum="3">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="0.6">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:weightSum="1.35">
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.8"
+                        android:layout_marginTop="20dp"
+                        android:layout_marginBottom="10dp">
+
+                        <TextView
+                            android:id="@+id/titleTV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintTop_toTopOf="parent"
+
+                            android:text="Ranking"
+                            android:textSize="40sp"
+                            android:textColor="@color/white"
+                            android:fontFamily="@font/k2d_semi_bold" />
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.4">
+
+                        <androidx.cardview.widget.CardView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+
+                            android:layout_marginStart="20dp"
+                            android:layout_marginEnd="20dp"
+
+                            app:cardCornerRadius="20dp"
+
+                            android:visibility="invisible"
+
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintTop_toTopOf="parent">
+
+                            <androidx.constraintlayout.widget.ConstraintLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:background="@drawable/menu_player_info_box">
+
+                                <TextView
+                                    android:id="@+id/userNameTV"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginStart="20dp"
+
+                                    android:fontFamily="@font/k2d_bold"
+                                    android:text="TestUserName"
+                                    android:textColor="@color/white"
+                                    android:textSize="15sp"
+
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintTop_toTopOf="parent" />
+
+
+                                <TextView
+                                    android:id="@+id/pointsTV"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+
+                                    android:fontFamily="@font/k2d_bold"
+                                    android:text="1000000"
+                                    android:textColor="@color/white"
+                                    android:textSize="15sp"
+
+                                    app:layout_constraintRight_toLeftOf="@+id/rankingTV"
+                                    app:layout_constraintTop_toTopOf="parent" />
+
+
+                                <TextView
+                                    android:id="@+id/rankingTV"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginEnd="20dp"
+
+                                    android:fontFamily="@font/k2d_bold"
+                                    android:text=" | 1"
+                                    android:textColor="@color/white"
+                                    android:textSize="15sp"
+
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintTop_toTopOf="parent" />
+
+                            </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        </androidx.cardview.widget.CardView>
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.15">
+
+                        <TextView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+
+                            android:layout_marginTop="10dp"
+                            android:layout_marginStart="20dp"
+                            android:layout_marginEnd="20dp"
+
+                            android:background="@color/orange" />
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                </LinearLayout>
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="2.4"
+                android:weightSum="3"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35"
+                    android:weightSum="3"
+                    android:orientation="vertical">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="0dp"
+                        android:layout_weight="1.2"
+                        />
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:id="@+id/trapezeTopLeft"
+                        android:layout_width="wrap_content"
+                        android:layout_height="0dp"
+                        android:layout_weight="1"
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_left"/>
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="2.3"
+                    android:weightSum="2"
+                    android:orientation="vertical">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="1.7"
+
+                        android:layout_marginTop="10dp"
+
+                        android:orientation="horizontal">
+
+                        <androidx.cardview.widget.CardView
+                            android:id="@+id/mainCardView"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            app:cardCornerRadius="50dp">
+
+                            <androidx.constraintlayout.widget.ConstraintLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:background="@color/beige">
+
+                            </androidx.constraintlayout.widget.ConstraintLayout>
+
+                            <androidx.cardview.widget.CardView
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:layout_margin="5dp"
+                                app:cardCornerRadius="50dp">
+
+                                <androidx.constraintlayout.widget.ConstraintLayout
+                                    android:layout_width="match_parent"
+                                    android:layout_height="match_parent"
+                                    android:background="@color/black">
+
+                                    <androidx.recyclerview.widget.RecyclerView
+                                        android:id="@+id/rankingRecycleView"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="0dp"
+
+                                        android:layout_marginTop="10dp"
+                                        android:layout_marginBottom="10dp"
+                                        android:layout_marginStart="20dp"
+                                        android:layout_marginEnd="20dp"
+
+                                        android:scrollbars="vertical"
+                                        app:layout_constraintEnd_toEndOf="parent"
+                                        app:layout_constraintStart_toStartOf="parent"
+                                        app:layout_constraintTop_toTopOf="parent"
+                                        app:layout_constraintBottom_toBottomOf="parent">
+
+                                    </androidx.recyclerview.widget.RecyclerView>
+
+
+                                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                            </androidx.cardview.widget.CardView>
+
+                        </androidx.cardview.widget.CardView>
+
+
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.3"
+                        android:orientation="horizontal"
+                        android:gravity="center">
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/backBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+
+                            android:layout_marginEnd="25dp"
+                            android:layout_marginStart="25dp"
+
+                            android:drawableStart="@drawable/ic_baseline_turn_left_24"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="60dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Back"
+                            android:textAlignment="textStart"
+                            android:textSize="20dp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                    </LinearLayout>
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35"
+                    android:weightSum="3"
+                    android:orientation="vertical">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:id="@+id/trapezeTopRight"
+                        android:layout_width="wrap_content"
+                        android:layout_height="0dp"
+                        android:layout_weight="1"
+
+                        android:layout_marginTop="10dp"
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_right"/>
+
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</LinearLayout>

+ 304 - 0
app/src/main/res/layout/activity_register.xml

@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".StartActivity"
+    android:orientation="vertical"
+
+    android:background="@color/black">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+
+        android:layout_margin="20dp"
+        app:cardCornerRadius="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/gradient_background"
+
+            android:orientation="vertical"
+            android:weightSum="3">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="0.7">
+
+                <TextView
+                    android:id="@+id/titleTV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+
+                    android:text="Register"
+                    android:textSize="45dp"
+                    android:textColor="@color/white"
+                    android:fontFamily="@font/k2d_semi_bold"
+
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintBottom_toBottomOf="@+id/cardInfoTV"/>
+
+                <TextView
+                    android:id="@+id/cardInfoTV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+
+                    android:text="Create your account"
+                    android:textSize="20dp"
+                    android:textColor="@color/white"
+                    android:fontFamily="@font/k2d_semi_bold"
+
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/titleTV"
+                    app:layout_constraintBottom_toBottomOf="parent"/>
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="2.3"
+                android:weightSum="3"
+                android:orientation="horizontal"
+                >
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:id="@+id/trapezeTopLeft"
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_left"/>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="2.3">
+
+                    <androidx.cardview.widget.CardView
+                        android:id="@+id/mainCardView"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_marginBottom="80dp"
+                        app:cardCornerRadius="50dp">
+
+                        <androidx.constraintlayout.widget.ConstraintLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:background="@color/beige">
+
+                        </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        <androidx.cardview.widget.CardView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_margin="5dp"
+                            app:cardCornerRadius="50dp">
+
+                            <androidx.constraintlayout.widget.ConstraintLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:background="@color/black">
+
+                                <EditText
+                                    android:id="@+id/userNameET"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginStart="30dp"
+                                    android:layout_marginEnd="30dp"
+
+                                    android:drawableStart="@drawable/ic_baseline_person_24"
+                                    android:drawablePadding="12dp"
+
+                                    android:background="@drawable/custom_input"
+
+                                    android:inputType="textPersonName"
+
+                                    android:autofillHints=""
+                                    android:hint="UserName"
+                                    android:textColor="@color/white"
+
+                                    android:textColorHint="@color/white"
+                                    app:layout_constraintBottom_toTopOf="@+id/emailET"
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintTop_toTopOf="parent" />
+
+                                <EditText
+                                    android:id="@+id/emailET"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginStart="30dp"
+                                    android:layout_marginEnd="30dp"
+
+                                    android:drawableStart="@drawable/ic_baseline_email_24"
+                                    android:drawablePadding="12dp"
+
+                                    android:background="@drawable/custom_input"
+
+                                    android:inputType = "textEmailAddress"
+
+                                    android:autofillHints=""
+                                    android:hint="Email Address"
+                                    android:textColor="@color/white"
+
+                                    android:textColorHint="@color/white"
+                                    app:layout_constraintBottom_toTopOf="@+id/passwordET"
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintTop_toBottomOf="@+id/userNameET" />
+
+
+                                <EditText
+                                    android:id="@+id/passwordET"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginStart="30dp"
+                                    android:layout_marginEnd="30dp"
+
+                                    android:drawableStart="@drawable/ic_baseline_lock_24"
+                                    android:drawablePadding="12dp"
+
+                                    android:background="@drawable/custom_input"
+
+                                    android:inputType="textPassword"
+
+                                    android:autofillHints=""
+                                    android:hint="Password"
+                                    android:textColor="@color/white"
+
+                                    android:textColorHint="@color/white"
+                                    app:layout_constraintBottom_toTopOf="@+id/rePasswordET"
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintTop_toBottomOf="@+id/emailET" />
+
+                                <EditText
+                                    android:id="@+id/rePasswordET"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginStart="30dp"
+                                    android:layout_marginEnd="30dp"
+
+                                    android:drawableStart="@drawable/ic_baseline_lock_24"
+                                    android:drawablePadding="12dp"
+
+                                    android:background="@drawable/custom_input"
+
+                                    android:inputType="textPassword"
+
+                                    android:autofillHints=""
+                                    android:hint="Confirm Password"
+                                    android:textColor="@color/white"
+
+                                    android:textColorHint="@color/white"
+                                    app:layout_constraintBottom_toTopOf="@+id/createBtn"
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintTop_toBottomOf="@+id/passwordET" />
+
+                                <androidx.appcompat.widget.AppCompatButton
+                                    android:id="@+id/createBtn"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginEnd="20dp"
+                                    android:layout_marginStart="20dp"
+
+                                    app:layout_constraintTop_toBottomOf="@+id/rePasswordET"
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintBottom_toBottomOf="parent"
+
+                                    android:text="CREATE"
+                                    android:textSize="20dp"
+                                    android:textColor="@color/black"
+                                    android:fontFamily="@font/k2d_semi_bold"
+
+                                    android:background="@drawable/custom_button_1"/>
+
+
+                            </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        </androidx.cardview.widget.CardView>
+
+                    </androidx.cardview.widget.CardView>
+
+                    <androidx.appcompat.widget.AppCompatButton
+                        android:id="@+id/backBtn"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+
+                        android:layout_marginEnd="25dp"
+                        android:layout_marginStart="25dp"
+
+                        app:layout_constraintTop_toBottomOf="@+id/mainCardView"
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:drawableStart="@drawable/ic_baseline_turn_left_24"
+                        android:drawablePadding="5dp"
+                        android:paddingStart="60dp"
+
+                        android:textAllCaps="false"
+
+                        android:text="Back"
+                        android:textAlignment="textStart"
+                        android:textSize="20dp"
+                        android:textColor="@color/black"
+                        android:fontFamily="@font/k2d_semi_bold"
+
+                        android:background="@drawable/custom_button_1"/>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_right"/>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</LinearLayout>

+ 358 - 0
app/src/main/res/layout/activity_report.xml

@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".ReportActivity"
+    android:orientation="vertical"
+
+    android:background="@color/black">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+
+        android:layout_margin="20dp"
+        app:cardCornerRadius="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:weightSum="3"
+            android:orientation="horizontal"
+            android:background="@drawable/gradient_background">
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="0.25"
+                android:weightSum="3"
+                android:orientation="vertical">
+
+                <com.google.android.material.imageview.ShapeableImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="0.2" />
+
+                <com.google.android.material.imageview.ShapeableImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1"
+
+                    android:background="@drawable/trapeze_left"/>
+
+                <com.google.android.material.imageview.ShapeableImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="0.5" />
+
+                <com.google.android.material.imageview.ShapeableImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1"
+
+                    android:background="@drawable/trapeze_left"/>
+
+                <com.google.android.material.imageview.ShapeableImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="0.3" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="2.5"
+                android:orientation="vertical">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:orientation="vertical"
+                    android:background="@drawable/menu_player_info_box"
+
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="10dp"
+                    android:weightSum="3">
+
+                    <TextView
+                        android:id="@+id/resultTV"
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.20"
+
+                        android:gravity="center"
+
+                        android:text="Correct"
+                        android:autoSizeTextType="uniform"
+                        android:textColor="@color/white"
+                        android:fontFamily="@font/k2d_bold" />
+
+                    <TextView
+                        android:id="@+id/pointsTV"
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.15"
+
+                        android:gravity="center"
+
+                        android:text="+10"
+                        android:textAlignment="center"
+                        android:autoSizeTextType="uniform"
+                        android:textColor="@color/white"
+                        android:fontFamily="@font/k2d_bold" />
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+
+                        android:layout_marginTop="10dp"
+                        android:layout_marginStart="10dp"
+                        android:layout_marginEnd="10dp"
+
+                        android:layout_weight="1.60"
+
+                        android:background="@drawable/menu_player_info_box">
+
+                        <TextView
+                            android:id="@+id/questionTV"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginTop="20dp"
+
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintTop_toTopOf="parent"
+
+                            android:text="Question of the task"
+                            android:textAlignment="center"
+                            android:textSize="20sp"
+                            android:textColor="@color/white"
+                            android:fontFamily="@font/k2d_bold" />
+
+                        <TextView
+                            android:id="@+id/contentTV"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+
+                            android:layout_marginBottom="25dp"
+                            android:layout_marginStart="15dp"
+                            android:layout_marginEnd="15dp"
+
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintTop_toBottomOf="@+id/questionTV"
+
+                            android:text="#include stdio.h\n\nint main(void)\n{\n\t\tconst int a = 5;\n\t\ta++;\n\t\tprintf(”%d”, a);\n\t\treturn 0;\n}"
+                            android:textAlignment="viewStart"
+                            android:textColor="@color/orange"
+                            android:fontFamily="@font/k2d_bold" />
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+
+                        android:layout_marginTop="20dp"
+                        android:layout_marginStart="10dp"
+                        android:layout_marginEnd="10dp"
+
+                        android:layout_weight="0.8"
+
+                        android:background="@drawable/menu_player_info_box">
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/aBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="35dp"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+
+                            app:layout_constraintVertical_chainStyle="spread"
+
+                            app:layout_constraintTop_toTopOf="parent"
+                            app:layout_constraintBottom_toTopOf="@+id/bBtn"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_a"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer A"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/bBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="35dp"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+
+                            app:layout_constraintVertical_chainStyle="spread"
+
+                            app:layout_constraintTop_toBottomOf="@+id/aBtn"
+                            app:layout_constraintBottom_toTopOf="@+id/cBtn"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_b"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer B"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/cBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="35dp"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+
+                            app:layout_constraintVertical_chainStyle="spread"
+
+                            app:layout_constraintTop_toBottomOf="@+id/bBtn"
+                            app:layout_constraintBottom_toTopOf="@+id/dBtn"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_c"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer C"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/dBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="35dp"
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+
+                            app:layout_constraintVertical_chainStyle="spread"
+
+                            app:layout_constraintTop_toBottomOf="@+id/cBtn"
+                            app:layout_constraintBottom_toBottomOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintEnd_toEndOf="parent"
+
+                            android:drawableStart="@drawable/icons8_d"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="0dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Answer C"
+                            android:textAlignment="viewStart"
+                            android:textSize="20sp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                    </androidx.constraintlayout.widget.ConstraintLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        android:layout_weight="0.25"
+                        android:orientation="horizontal"
+                        android:gravity="center">
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/backBtn"
+                            android:layout_width="match_parent"
+                            android:layout_height="40dp"
+
+
+                            android:layout_marginEnd="40dp"
+                            android:layout_marginStart="40dp"
+
+                            android:drawableStart="@drawable/ic_baseline_turn_left_24"
+                            android:drawablePadding="5dp"
+                            android:paddingStart="60dp"
+
+                            android:textAllCaps="false"
+
+                            android:text="Back"
+                            android:textAlignment="textStart"
+                            android:textSize="20dp"
+                            android:textColor="@color/black"
+                            android:fontFamily="@font/k2d_semi_bold"
+
+                            android:background="@drawable/custom_button_1"/>
+
+                    </LinearLayout>
+
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:weightSum="3"
+                android:layout_weight="0.25"
+                android:orientation="vertical">
+
+                <com.google.android.material.imageview.ShapeableImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="0.6" />
+
+                <com.google.android.material.imageview.ShapeableImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1.6"
+
+                    android:background="@drawable/trapeze_right"/>
+
+                <com.google.android.material.imageview.ShapeableImageView
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="0.8" />
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</LinearLayout>

+ 200 - 0
app/src/main/res/layout/activity_start.xml

@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".StartActivity"
+    android:orientation="vertical"
+
+    android:background="@color/black">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+
+        android:layout_margin="20dp"
+        app:cardCornerRadius="50dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/gradient_background"
+
+            android:orientation="vertical"
+            android:weightSum="3">
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1">
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintBottom_toBottomOf="parent"
+
+                    app:srcCompat="@drawable/ic_launcher_background" />
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="2"
+                android:weightSum="3"
+                android:orientation="horizontal"
+                >
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+
+                        android:layout_marginTop="100dp"
+                        android:layout_marginBottom="100dp"
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_left"/>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="2.3">
+
+                    <androidx.cardview.widget.CardView
+                        android:id="@+id/mainCardView"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_marginBottom="80dp"
+                        app:cardCornerRadius="50dp">
+
+                        <androidx.constraintlayout.widget.ConstraintLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:background="@color/beige">
+
+                        </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        <androidx.cardview.widget.CardView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_margin="5dp"
+                            app:cardCornerRadius="50dp">
+
+                            <androidx.constraintlayout.widget.ConstraintLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:background="@color/black">
+
+                                <TextView
+                                    android:id="@+id/descriptionTV"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginStart="10dp"
+                                    android:layout_marginEnd="10dp"
+
+                                    android:textSize="20dp"
+                                    android:text="Develop your programming skills and compete with your friends"
+                                    android:textColor="@color/white"
+                                    android:textAlignment="center"
+                                    android:fontFamily="@font/k2d_semi_bold"
+
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintBottom_toTopOf="@+id/loginBtn"
+                                    app:layout_constraintTop_toTopOf="parent"/>
+
+                                <androidx.appcompat.widget.AppCompatButton
+                                    android:id="@+id/loginBtn"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginEnd="15dp"
+                                    android:layout_marginStart="15dp"
+
+                                    app:layout_constraintTop_toBottomOf="@+id/descriptionTV"
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintBottom_toTopOf="@+id/signupBtn"
+
+                                    android:text="Login"
+                                    android:textColor="@color/black"
+                                    android:textSize="15dp"
+                                    android:fontFamily="@font/k2d_semi_bold"
+
+                                    android:background="@drawable/custom_button_1"/>
+
+                                <androidx.appcompat.widget.AppCompatButton
+                                    android:id="@+id/signupBtn"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+
+                                    android:layout_marginEnd="15dp"
+                                    android:layout_marginStart="14dp"
+                                    android:layout_marginBottom="70dp"
+
+                                    app:layout_constraintTop_toBottomOf="@+id/loginBtn"
+                                    app:layout_constraintLeft_toLeftOf="parent"
+                                    app:layout_constraintRight_toRightOf="parent"
+                                    app:layout_constraintBottom_toBottomOf="parent"
+
+                                    android:text="sign up"
+                                    android:textSize="15dp"
+                                    android:textColor="@color/black"
+                                    android:fontFamily="@font/k2d_semi_bold"
+
+                                    android:background="@drawable/custom_button_1"/>
+
+                            </androidx.constraintlayout.widget.ConstraintLayout>
+
+                        </androidx.cardview.widget.CardView>
+
+                    </androidx.cardview.widget.CardView>
+
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="0.35">
+
+                    <com.google.android.material.imageview.ShapeableImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+
+                        android:layout_marginTop="100dp"
+                        android:layout_marginBottom="100dp"
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintBottom_toBottomOf="parent"
+
+                        android:background="@drawable/trapeze_right"/>
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</LinearLayout>

+ 47 - 0
app/src/main/res/layout/category_row.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/singleCategoryLayout">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+
+        android:layout_marginTop="25dp"
+        android:layout_marginStart="10dp"
+        android:layout_marginEnd="10dp"
+
+        app:cardCornerRadius="20dp"
+
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/orange">
+
+            <TextView
+                android:id="@+id/titleTextView"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+
+                android:text="Title"
+                android:textSize="20sp"
+                android:textColor="@color/black"
+                android:fontFamily="@font/k2d_bold"
+
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 99 - 0
app/src/main/res/layout/ranking_row.xml

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/singleUserLayout">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+
+        android:layout_marginTop="10dp"
+        android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
+
+        app:cardCornerRadius="10dp"
+
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/beige">
+
+            <androidx.cardview.widget.CardView
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+
+                android:layout_margin="2dp"
+                app:cardCornerRadius="10dp"
+
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <androidx.constraintlayout.widget.ConstraintLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:background="@color/black">
+
+                    <TextView
+                        android:id="@+id/userNameTV"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+
+                        android:layout_marginStart="10dp"
+
+                        android:text="TestUserName"
+                        android:autoSizeTextType="uniform"
+                        android:textColor="@color/white"
+                        android:fontFamily="@font/k2d_bold"
+
+                        app:layout_constraintLeft_toLeftOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+
+                    <TextView
+                        android:id="@+id/pointsTV"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+
+                        android:text="1000000"
+                        android:autoSizeTextType="uniform"
+                        android:textColor="@color/white"
+                        android:fontFamily="@font/k2d_bold"
+
+                        app:layout_constraintRight_toLeftOf="@+id/rankingTV"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+
+                    <TextView
+                        android:id="@+id/rankingTV"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+
+                        android:layout_marginEnd="10dp"
+
+                        android:text=" | 1"
+                        android:autoSizeTextType="uniform"
+                        android:textColor="@color/white"
+                        android:fontFamily="@font/k2d_bold"
+
+                        app:layout_constraintRight_toRightOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                </androidx.constraintlayout.widget.ConstraintLayout>
+
+            </androidx.cardview.widget.CardView>
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+    </androidx.cardview.widget.CardView>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

BIN=BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp


BIN=BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp


BIN=BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp


BIN=BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp


BIN=BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp


BIN=BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp


BIN=BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp


BIN=BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp


BIN=BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp


BIN=BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp


+ 16 - 0
app/src/main/res/values-night/themes.xml

@@ -0,0 +1,16 @@
+<resources xmlns:tools="http://schemas.android.com/tools">
+    <!-- Base application theme. -->
+    <style name="Theme.ProgramingQuiz" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
+        <!-- Primary brand color. -->
+        <item name="colorPrimary">@color/purple_200</item>
+        <item name="colorPrimaryVariant">@color/purple_700</item>
+        <item name="colorOnPrimary">@color/black</item>
+        <!-- Secondary brand color. -->
+        <item name="colorSecondary">@color/teal_200</item>
+        <item name="colorSecondaryVariant">@color/teal_200</item>
+        <item name="colorOnSecondary">@color/black</item>
+        <!-- Status bar color. -->
+        <item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
+        <!-- Customize your theme here. -->
+    </style>
+</resources>

+ 19 - 0
app/src/main/res/values/colors.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="purple_200">#FFBB86FC</color>
+    <color name="purple_500">#FF6200EE</color>
+    <color name="purple_700">#FF3700B3</color>
+    <color name="teal_200">#FF03DAC5</color>
+    <color name="teal_700">#FF018786</color>
+    <color name="black">#FF000000</color>
+    <color name="white">#FFFFFFFF</color>
+    <color name="beige">#554C4C</color>
+    <color name="orange">#F6C822</color>
+    <color name="dark_orange">#A4861D</color>
+    <color name="trans">#00000000 </color>
+    <color name="red">#FC0000 </color>
+    <color name="green">#05FF00 </color>
+
+    <color name="black_fade_1">#090909</color>
+    <color name="black_fade_2">#151515</color>
+</resources>

+ 3 - 0
app/src/main/res/values/strings.xml

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">ProgramingQuiz</string>
+</resources>

+ 16 - 0
app/src/main/res/values/themes.xml

@@ -0,0 +1,16 @@
+<resources xmlns:tools="http://schemas.android.com/tools">
+    <!-- Base application theme. -->
+    <style name="Theme.ProgramingQuiz" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
+        <!-- Primary brand color. -->
+        <item name="colorPrimary">@color/purple_500</item>
+        <item name="colorPrimaryVariant">@color/purple_700</item>
+        <item name="colorOnPrimary">@color/white</item>
+        <!-- Secondary brand color. -->
+        <item name="colorSecondary">@color/teal_200</item>
+        <item name="colorSecondaryVariant">@color/teal_700</item>
+        <item name="colorOnSecondary">@color/black</item>
+        <!-- Status bar color. -->
+        <item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
+        <!-- Customize your theme here. -->
+    </style>
+</resources>

+ 13 - 0
app/src/main/res/xml/backup_rules.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+   Sample backup rules file; uncomment and customize as necessary.
+   See https://developer.android.com/guide/topics/data/autobackup
+   for details.
+   Note: This file is ignored for devices older that API 31
+   See https://developer.android.com/about/versions/12/backup-restore
+-->
+<full-backup-content>
+    <!--
+   <include domain="sharedpref" path="."/>
+   <exclude domain="sharedpref" path="device.xml"/>
+-->
+</full-backup-content>

+ 19 - 0
app/src/main/res/xml/data_extraction_rules.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+   Sample data extraction rules file; uncomment and customize as necessary.
+   See https://developer.android.com/about/versions/12/backup-restore#xml-changes
+   for details.
+-->
+<data-extraction-rules>
+    <cloud-backup>
+        <!-- TODO: Use <include> and <exclude> to control what is backed up.
+        <include .../>
+        <exclude .../>
+        -->
+    </cloud-backup>
+    <!--
+    <device-transfer>
+        <include .../>
+        <exclude .../>
+    </device-transfer>
+    -->
+</data-extraction-rules>

+ 17 - 0
app/src/test/java/com/example/programingquiz/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.example.programingquiz;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() {
+        assertEquals(4, 2 + 2);
+    }
+}

+ 19 - 0
build.gradle

@@ -0,0 +1,19 @@
+buildscript {
+    repositories {
+        google()  // Google's Maven repository
+        mavenCentral()  // Maven Central repository
+    }
+    dependencies {
+        classpath 'com.google.gms:google-services:4.3.13'
+    }
+}
+
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+    id 'com.android.application' version '7.3.1' apply false
+    id 'com.android.library' version '7.3.1' apply false
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 21 - 0
gradle.properties

@@ -0,0 +1,21 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true

BIN=BIN
gradle/wrapper/gradle-wrapper.jar


+ 6 - 0
gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,6 @@
+#Sat Dec 10 14:01:29 CET 2022
+distributionBase=GRADLE_USER_HOME
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
+distributionPath=wrapper/dists
+zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME

+ 185 - 0
gradlew

@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "$*"
+}
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=`expr $i + 1`
+    done
+    case $i in
+        0) set -- ;;
+        1) set -- "$args0" ;;
+        2) set -- "$args0" "$args1" ;;
+        3) set -- "$args0" "$args1" "$args2" ;;
+        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"

+ 89 - 0
gradlew.bat

@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem      https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 33 - 0
programmig-quiz-back-end/.gitignore

@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/

BIN=BIN
programmig-quiz-back-end/.mvn/wrapper/maven-wrapper.jar


+ 2 - 0
programmig-quiz-back-end/.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

+ 316 - 0
programmig-quiz-back-end/mvnw

@@ -0,0 +1,316 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /usr/local/etc/mavenrc ] ; then
+    . /usr/local/etc/mavenrc
+  fi
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`\\unset -f command; \\command -v java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  $MAVEN_DEBUG_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" \
+  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 188 - 0
programmig-quiz-back-end/mvnw.cmd

@@ -0,0 +1,188 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+  %JVM_CONFIG_MAVEN_PROPS% ^
+  %MAVEN_OPTS% ^
+  %MAVEN_DEBUG_OPTS% ^
+  -classpath %WRAPPER_JAR% ^
+  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%

+ 72 - 0
programmig-quiz-back-end/pom.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.springframework.boot</groupId>
+		<artifactId>spring-boot-starter-parent</artifactId>
+		<version>3.0.1</version>
+		<relativePath/> <!-- lookup parent from repository -->
+	</parent>
+	<groupId>com.example.firebase</groupId>
+	<artifactId>programmig-quiz-back-end</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<name>programmig-quiz-back-end</name>
+	<description>programming quiz back-end project</description>
+	<properties>
+		<java.version>17</java.version>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-test</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>com.google.firebase</groupId>
+			<artifactId>firebase-admin</artifactId>
+			<version>9.1.1</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.security</groupId>
+			<artifactId>spring-security-crypto</artifactId>
+			<version>5.6.2</version>
+		</dependency>
+
+		<dependency>
+			<groupId>de.mkammerer</groupId>
+			<artifactId>argon2-jvm</artifactId>
+			<version>2.7</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.bouncycastle</groupId>
+			<artifactId>bcprov-jdk15on</artifactId>
+			<version>1.64</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.googlecode.json-simple</groupId>
+			<artifactId>json-simple</artifactId>
+			<version>1.1.1</version>
+		</dependency>
+
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

+ 12 - 0
programmig-quiz-back-end/serviceAccountKey.json

@@ -0,0 +1,12 @@
+{
+  "type": "service_account",
+  "project_id": "programmingquiz-2bfbb",
+  "private_key_id": "bf05c7186c09b190cb37e7d9135000adec58b991",
+  "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDEA1jcDOgXszQz\nnbYJ6psHRAIzGicOzDRz4S+j6v6Eb4z3N/DZjcMy48Ge+hGpksSF03fII7Lrprrj\nALirSrF8UghSQZuYsPgye6aSmPouybgz/QuhezTnbIO9YXfbcWmJTIGqZ+j2LPq4\nhj3YOwJAB4XEnbd4G1IsYffHheno1ks7lMTYbKwr8hVkLy4QHLArwUT0tt2G2UA1\ng0kbdjqfSJhr7+P+Sdl3dZrDW+HF0voExo0/NutRLEFcsbIWWHOBf28Vq/lM/Iec\nU2/og0VdOK+mfYSRecw5DT1piA/yZhm7ylmFuvuiLrJ0B1CDNR6lc/cHlkA8Szt5\nAHbp7IjtAgMBAAECggEADOXM0WCcCQCGsnrHLAHe75cfBJkiRsv9tj5JXIzYRdid\nOvXYXZ2sDCDbxbKIulK+UbFSKWjdRg+eLn+xUbwZelJfhSIXXfBkdICZu6hglfbk\nra8R4S9H545xYLhqzZVkhLSfDO/Hbs4TiqlypP7FAszmlW3B+8o4bv6HR6ldHy/q\nVcxMGnnnLuz4UhK4OXfIQuGSCVRE7yauZRNyI91abokpouWJ3nYFbh0yi1Knwsgk\nZKrPN8fHWNiThXJD74edkBkwhGaNpUMY2fhxcE6TTd3KXWWBPYt+OrJM2bvrXydK\nVL6r/Z+iHLJc0TQnoVWSnDy5C4UHlmiZ+9vznLqb9QKBgQD1Zr0CjyS+n0IKVEuP\n4DzwHXdxh4YQhN6H8WcrTURv7Mo+5+ZjzghRUwkfIqaOpbqK5FRgr93fh2kyeXjB\nxBsD6fq0FrMcyMzFtS+ji1lqCO/5tIYnIkGfmJBMa4K+vO7m/W1N+CrTMJZQxv5l\nDgT/VEvMSbZ6D7FnrbVCnz91ywKBgQDMeo0fqRNFngNWQTLuYKG6813bP7L91wCf\ntBnJ016YLz4gcW0Cfm0IYbC7oaqD78xWipPwhvAkJmATVq3xil2+mnY6jifGx7ML\noTXrd02Jxo4nUgu1gkBwfTvOQw5BVZoYe4ncf7bCu4kOBHDll1mkKqEYgJr75Jml\nTdcjZEnlJwKBgQCE5wg0K5vl1NBqUa6+k93M2NiIVrJHnf36t8V9ERKgXyhFG0iO\nAtZEXOkSwKxdkunNMM11s6lA1tAlMt4wammLHBvXjnegfitQY8kSFHTvVTnKDXee\nGBJcQb7cdFlRvXbRCK06zc07pROzWaIKzqXsNhX65Gz7/CXDFbOWCjLPMwKBgQCw\ndFVSbApYelpw1cTI1xTaCugEqvygdyhvqPDULRYliCc5wggLLeSTZhIoaQOH5ajV\nSbMOzrNuzrr8FUH3/aqWMB80urXyoSSONakdMI/2BCVqIzA9i1BmgnvYrB8iHGfl\nFr7KTF//veww734pcqmFtM/eICUemJBKiVjNjt8B4wKBgE2BWBzfpTbcQfA6jwym\nZRNivIbTQK2fl74WAIVyzf2KOEZ0F8vCBngHN/1PZTUdSpD4G19LZNtcxAfvYNZ1\nZ6FBj9eWNqLK50ZjNLFI5NESY8lEAwgjAD+zucN0Whi54lYpsOz12cFkSUi7a6Cb\nFNFhxP/o9xhi1xoYxeeQSqAJ\n-----END PRIVATE KEY-----\n",
+  "client_email": "firebase-adminsdk-pgf9j@programmingquiz-2bfbb.iam.gserviceaccount.com",
+  "client_id": "111567266839075941303",
+  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
+  "token_uri": "https://oauth2.googleapis.com/token",
+  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
+  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-pgf9j%40programmingquiz-2bfbb.iam.gserviceaccount.com"
+}

+ 13 - 0
programmig-quiz-back-end/src/main/java/com/example/firebase/programmigquizbackend/ProgrammigQuizBackEndApplication.java

@@ -0,0 +1,13 @@
+package com.example.firebase.programmigquizbackend;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ProgrammigQuizBackEndApplication {
+
+	public static void main(String[] args) {
+		SpringApplication.run(ProgrammigQuizBackEndApplication.class, args);
+	}
+
+}

+ 26 - 0
programmig-quiz-back-end/src/main/java/com/example/firebase/programmigquizbackend/controller/CategoryController.java

@@ -0,0 +1,26 @@
+package com.example.firebase.programmigquizbackend.controller;
+
+
+import com.example.firebase.programmigquizbackend.service.CategoryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.concurrent.ExecutionException;
+
+@RestController
+@RequestMapping("/api")
+public class CategoryController {
+
+    @Autowired
+    private CategoryService categoryService;
+
+    @GetMapping("/getCategories")
+    public Map<String, ArrayList<String>> getCategories() throws ExecutionException, InterruptedException {
+        return categoryService.getCategories();
+    }
+
+}

+ 28 - 0
programmig-quiz-back-end/src/main/java/com/example/firebase/programmigquizbackend/controller/TaskController.java

@@ -0,0 +1,28 @@
+package com.example.firebase.programmigquizbackend.controller;
+
+import com.example.firebase.programmigquizbackend.entity.Task;
+import com.example.firebase.programmigquizbackend.service.TaskService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.concurrent.ExecutionException;
+
+@RestController
+@RequestMapping("/api")
+public class TaskController {
+
+    @Autowired
+    private TaskService taskService;
+
+    @GetMapping("/drawTask/{category}/{difficulty}")
+    public Task drawTask(@PathVariable String category, @PathVariable Task.DifficultyType difficulty) throws ExecutionException, InterruptedException {
+        return taskService.drawTask(category, difficulty);
+    }
+    @GetMapping("/getTask/{category}/{id}")
+    public Task getTask(@PathVariable String category, @PathVariable Long id) throws ExecutionException, InterruptedException {
+        return taskService.getTask(category, id);
+    }
+}

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio