forked from hush/SilentDragonAndroid-old
8 changed files with 58 additions and 1 deletions
@ -0,0 +1,28 @@ |
|||
// Copyright 2019-2020 The Hush developers |
|||
// Released under the GPLv3 |
|||
package org.myhush.silentdragon |
|||
|
|||
import androidx.appcompat.app.AppCompatActivity |
|||
import android.content.Intent |
|||
import android.os.Bundle |
|||
import android.os.Handler |
|||
|
|||
class SplashActivity : AppCompatActivity() { |
|||
|
|||
// This is the loading time of the splash screen |
|||
private val SPLASH_TIME_OUT: Long = 3000 // 3 seconds |
|||
|
|||
override fun onCreate(savedInstanceState: Bundle?) { |
|||
super.onCreate(savedInstanceState) |
|||
setContentView(R.layout.activity_splash) |
|||
|
|||
Handler().postDelayed({ |
|||
// This method will be executed once the timer is over |
|||
startActivity(Intent(this,MainActivity::class.java)) |
|||
|
|||
// close this activity |
|||
finish() |
|||
}, SPLASH_TIME_OUT) |
|||
} |
|||
|
|||
} |
After Width: | Height: | Size: 1.0 MiB |
@ -0,0 +1,15 @@ |
|||
<?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" |
|||
android:orientation="vertical" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:background="@color/black"> |
|||
|
|||
<pl.droidsonroids.gif.GifImageView |
|||
android:id="@+id/splashImage" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:src="@drawable/silentdragon_animated_startup_dark"/> |
|||
|
|||
</LinearLayout> |
Loading…
Reference in new issue