diff --git a/.idea/misc.xml b/.idea/misc.xml index fdce42d..7f401a7 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -63,6 +63,7 @@ + @@ -71,7 +72,7 @@ - + diff --git a/app/src/main/java/com/gcect/gcectapp/ui/activity/SplashScreenActivity.kt b/app/src/main/java/com/gcect/gcectapp/ui/activity/SplashScreenActivity.kt index 7382cc9..e3cf526 100644 --- a/app/src/main/java/com/gcect/gcectapp/ui/activity/SplashScreenActivity.kt +++ b/app/src/main/java/com/gcect/gcectapp/ui/activity/SplashScreenActivity.kt @@ -6,6 +6,10 @@ import android.os.Bundle import android.os.Handler import android.view.WindowManager import com.gcect.gcectapp.R +import android.view.animation.Animation +import android.view.animation.AnimationUtils +import android.widget.ImageView + class SplashScreenActivity : AppCompatActivity() { private val SPLASH_SCREEN_TIME_OUT = 2000 @@ -17,10 +21,18 @@ class SplashScreenActivity : AppCompatActivity() { ) setContentView(R.layout.activity_splash_screen) + //variables for animation + // Animation topAnim + val backgroundImg : ImageView = findViewById(R.id.iv_logo) + val topAnim = AnimationUtils.loadAnimation(this,R.anim.top_navigation) + backgroundImg.startAnimation(topAnim) + + + Handler().postDelayed(Runnable { val intent = Intent(this, MainActivity::class.java) startActivity(intent) finish() - }, SPLASH_SCREEN_TIME_OUT.toLong()) + },5000) } } \ No newline at end of file diff --git a/app/src/main/res/anim/bottom_navigation.xml b/app/src/main/res/anim/bottom_navigation.xml new file mode 100644 index 0000000..3e50535 --- /dev/null +++ b/app/src/main/res/anim/bottom_navigation.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/anim/top_navigation.xml b/app/src/main/res/anim/top_navigation.xml new file mode 100644 index 0000000..2f3f95a --- /dev/null +++ b/app/src/main/res/anim/top_navigation.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_splash_screen.xml b/app/src/main/res/layout/activity_splash_screen.xml index f816860..4d57196 100644 --- a/app/src/main/res/layout/activity_splash_screen.xml +++ b/app/src/main/res/layout/activity_splash_screen.xml @@ -4,9 +4,10 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/white" + android:background="#FCFEFF" tools:context=".ui.activity.SplashScreenActivity">