Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ plugins {
}

android {
compileSdkVersion 30
compileSdkVersion 31
buildToolsVersion "30.0.2"

defaultConfig {
applicationId "com.sagarkhurana.quizforfun"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName "1.0"

Expand All @@ -30,6 +30,7 @@ android {

dependencies {

implementation 'androidx.core:core-splashscreen:1.0.0-alpha02'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
Expand Down
30 changes: 20 additions & 10 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,34 @@
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/Theme.QuizForFun">
<activity android:name=".GeographyOrLiteratureQuizActivity"></activity>
<activity android:name=".FinalResultActivity" />
<activity android:name=".MathQuizActivity" />
<activity android:name=".EditPasswordActivity" />
<activity android:name=".HistoryActivity" />
<activity android:name=".RuleActivity" />
<activity android:name=".QuizOptionActivity" />
<activity android:name=".RegisterActivity" />
<activity
android:name=".GeographyOrLiteratureQuizActivity"
android:exported="true" />
<activity android:name=".FinalResultActivity"
android:exported="true"/>
<activity android:name=".MathQuizActivity"
android:exported="true"/>
<activity android:name=".EditPasswordActivity"
android:exported="true"/>
<activity android:name=".HistoryActivity"
android:exported="true"/>
<activity android:name=".RuleActivity"
android:exported="true"/>
<activity android:name=".QuizOptionActivity"
android:exported="true"/>
<activity android:name=".RegisterActivity"
android:exported="true"/>
<activity
android:name=".LoginActivity"
android:theme="@style/splashScreenTheme">
android:theme="@style/Theme.App.Starting">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity" />
<activity android:name=".MainActivity"
android:exported="true"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sagarkhurana.quizforfun;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.splashscreen.SplashScreen;

import android.content.Intent;
import android.os.AsyncTask;
Expand Down Expand Up @@ -36,7 +37,7 @@ protected void onStart() {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(R.style.Theme_QuizForFun);
SplashScreen.installSplashScreen(this);
setContentView(R.layout.activity_login);

etUsername = findViewById(R.id.tietUsername);
Expand Down
9 changes: 6 additions & 3 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
<item name="textInputStyle">@style/editTextLayoutStyle</item>
</style>

<style name="splashScreenTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="android:windowBackground">@drawable/splash_image</item>
<item name="android:statusBarColor">@color/white</item>
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/white</item>

<item name="windowSplashScreenAnimatedIcon">@drawable/splash_image</item>

<item name="postSplashScreenTheme">@style/Theme.QuizForFun</item> # Required.
</style>

<!-- <style name="editTextStyle" parent="">-->
Expand Down