diff --git a/Listify/app/build.gradle b/Listify/app/build.gradle index 7038265..8b5895b 100644 --- a/Listify/app/build.gradle +++ b/Listify/app/build.gradle @@ -1,5 +1,6 @@ apply plugin: 'com.android.application' - +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 28 buildToolsVersion "30.0.2" @@ -54,5 +55,7 @@ dependencies { implementation 'com.crystal:crystalrangeseekbar:1.1.3' implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1' implementation "androidx.cardview:cardview:1.0.0" - + compileOnly "com.android.support:appcompat-v7:$supportLibVersion" + compileOnly "com.android.support:recyclerview-v7:$supportLibVersion" + compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } \ No newline at end of file diff --git a/Listify/app/src/main/java/com/example/listify/SplashActivity.java b/Listify/app/src/main/java/com/example/listify/SplashActivity.java deleted file mode 100644 index 545c443..0000000 --- a/Listify/app/src/main/java/com/example/listify/SplashActivity.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.example.listify; - -import android.content.Intent; -import android.os.Bundle; -import android.os.Handler; - -import androidx.annotation.Nullable; -import androidx.appcompat.app.AppCompatActivity; - -public class SplashActivity extends AppCompatActivity { - public static boolean showSplash = true; - - @Override - public void onBackPressed() {} - - @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_splashscreen); - - new Handler().postDelayed(new Runnable() { - @Override - public void run() { - showSplash = false; - Intent intent = new Intent(SplashActivity.this, MainActivity.class); - intent.putExtra("prev", "Splash"); - startActivity(intent); - } - }, 3000); - } -} \ No newline at end of file diff --git a/Listify/app/src/main/java/com/example/listify/SplashActivity.kt b/Listify/app/src/main/java/com/example/listify/SplashActivity.kt new file mode 100644 index 0000000..b49ecca --- /dev/null +++ b/Listify/app/src/main/java/com/example/listify/SplashActivity.kt @@ -0,0 +1,25 @@ +package com.example.listify + +import android.content.Intent +import android.os.Bundle +import android.os.Handler +import androidx.appcompat.app.AppCompatActivity + +class SplashActivity : AppCompatActivity() { + override fun onBackPressed() {} + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_splashscreen) + Handler().postDelayed({ + showSplash = false + val intent = Intent(this@SplashActivity, MainActivity::class.java) + intent.putExtra("prev", "Splash") + startActivity(intent) + }, 3000) + } + + companion object { + @JvmField + var showSplash = true + } +} \ No newline at end of file diff --git a/Listify/build.gradle b/Listify/build.gradle index 076bb08..f5a0351 100644 --- a/Listify/build.gradle +++ b/Listify/build.gradle @@ -1,5 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { + ext.kotlin_version = "1.3.72" + ext.supportLibVersion = "25.3.0" repositories { google() jcenter() @@ -7,6 +9,8 @@ buildscript { } dependencies { classpath "com.android.tools.build:gradle:4.0.1" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -19,7 +23,6 @@ allprojects { jcenter() mavenCentral() } - } task clean(type: Delete) {