mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Changed splash screen code to Kotlin in new repo
This commit is contained in:
parent
60784629b7
commit
a9bfd86ed5
@ -1,4 +1,30 @@
|
|||||||
package com.example.listify;
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*package com.example.listify;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -28,4 +54,4 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
Loading…
Reference in New Issue
Block a user