Skip to content

Instantly share code, notes, and snippets.

@ibrajix
Created December 9, 2022 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibrajix/233ead8e74685393f430bc6cf62342f3 to your computer and use it in GitHub Desktop.
Save ibrajix/233ead8e74685393f430bc6cf62342f3 to your computer and use it in GitHub Desktop.
splash_screen_android
<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=".ui.activities.SplashScreenActivity">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/animation_view"
android:layout_width="400dp"
android:layout_height="400dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/monkey"
app:lottie_speed="0.5" />
</androidx.constraintlayout.widget.ConstraintLayout>
//Kotlin
val activityIntent = Intent(this, IntroActivity::class.java)
Handler(Looper.getMainLooper()).postDelayed({
startActivity(activityIntent)
finish()}, SPLASH_SCREEN_TIME)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment