Skip to content

Commit

Permalink
Merge pull request #42 from PranavVyas20/dev3
Browse files Browse the repository at this point in the history
Animated splash screen added
  • Loading branch information
justdvnsh authored Oct 5, 2021
2 parents e7e749d + 1a0183c commit d867bb5
Show file tree
Hide file tree
Showing 14 changed files with 109 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.gradle
/local.properties
/.idea/caches
.idea
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
Expand Down
19 changes: 16 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ kapt {


android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
compileSdkVersion 31
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "divyansh.tech.animeclassroom"
minSdkVersion 24
targetSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -54,9 +54,13 @@ androidExtensions {
dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
//noinspection GradleDependency
implementation "androidx.core:core-ktx:$core_ktx"
//noinspection GradleDependency
implementation "androidx.appcompat:appcompat:$appcompat"
//noinspection GradleDependency
implementation "com.google.android.material:material:$material"
//noinspection GradleDependency
implementation "androidx.constraintlayout:constraintlayout:$constraint_layout"

// library modules
Expand All @@ -67,10 +71,13 @@ dependencies {

// test dependencies
testImplementation "junit:junit:$junit"
//noinspection GradleDependency
androidTestImplementation "androidx.test.ext:junit:$junit_ext"
//noinspection GradleDependency
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_core"

//fragment
//noinspection GradleDependency
implementation "androidx.fragment:fragment-ktx:$fragment_ktx"

// navigation
Expand All @@ -84,6 +91,7 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-service:$lifecycle_viewModels"

// dagger hilt
//noinspection GradleDependency
api "com.google.dagger:hilt-android:$hilt_version"
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"

Expand All @@ -92,13 +100,15 @@ dependencies {
kapt "androidx.hilt:hilt-compiler:$dagger_compiler"

// image loading
//noinspection GradleDependency
implementation "com.github.bumptech.glide:glide:$glide"
kapt "com.github.bumptech.glide:compiler:$glide"

// exoplayer
implementation (
"com.google.android.exoplayer:exoplayer:$exoplayer",
"com.google.android.exoplayer:extension-mediasession:$exoplayer",
"com.airbnb.android:lottie:4.1.0",
"com.google.android.exoplayer:exoplayer-core:$exoplayer",
"com.google.android.exoplayer:exoplayer-dash:$exoplayer",
"com.google.android.exoplayer:exoplayer-ui:$exoplayer",
Expand All @@ -111,4 +121,7 @@ dependencies {
kapt "com.airbnb.android:epoxy-processor:$epoxyVersion"

implementation "com.ms-square:expandableTextView:$expandableTextView"
//
// // Lottie

}
10 changes: 7 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".player.PlayerActivity" android:screenOrientation="sensorLandscape"/>
<activity android:name=".MainActivity">
<activity
android:name=".SplashActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".player.PlayerActivity"
android:screenOrientation="sensorLandscape" />
<activity android:name=".MainActivity" />
</application>

</manifest>
25 changes: 25 additions & 0 deletions app/src/main/java/divyansh/tech/animeclassroom/SplashActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package divyansh.tech.animeclassroom

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Handler
import android.view.WindowManager

class SplashActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_splash)

window.setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN
)

Handler().postDelayed({
val intent = Intent(this,MainActivity::class.java)
startActivity(intent)
finish()
},3000)
}
}
Binary file added app/src/main/res/font/anime_font.ttf
Binary file not shown.
Binary file added app/src/main/res/font/blowbrush.ttf
Binary file not shown.
32 changes: 32 additions & 0 deletions app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?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"
android:background="#f8f8ff"
android:orientation="vertical"
tools:context=".SplashActivity">


<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lotteAnim"
app:lottie_scale="0.6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:lottie_autoPlay="true"
app:lottie_rawRes="@raw/japan_scene_animation" />

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="60dp"
android:fontFamily="@font/blowbrush"
android:gravity="center"
android:text="Anime Classroom"
android:textColor="#FC9166"
android:textSize="70dp" />


</LinearLayout>
1 change: 1 addition & 0 deletions app/src/main/res/raw/japan_final.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/src/main/res/raw/japan_scene_animation.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
junit_ext="1.1.2"
espresso_core="3.3.0"
play_core="1.3.4"
hilt_version = '2.33-beta'
hilt_version = '2.38.1'
nav_version = "2.3.5"
moshi="2.6.0"
retrofit="2.6.0"
Expand All @@ -35,7 +35,7 @@ buildscript {
}
dependencies {
classpath "com.android.tools.build:gradle:$gradle_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$safeArgs"

Expand Down
6 changes: 3 additions & 3 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ plugins {
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
compileSdkVersion 31
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName "1.0"

Expand Down
6 changes: 3 additions & 3 deletions domain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
compileSdkVersion 31
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName "1.0"

Expand Down
18 changes: 9 additions & 9 deletions testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
compileSdkVersion 31
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName "1.0"

Expand All @@ -34,11 +34,11 @@ android {

dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'

implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
18 changes: 9 additions & 9 deletions utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
compileSdkVersion 31
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName "1.0"

Expand All @@ -34,11 +34,11 @@ android {

dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'

implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

0 comments on commit d867bb5

Please sign in to comment.