diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cbc08d8..a01e6e5 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -22,7 +22,7 @@ android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> - + diff --git a/app/src/main/java/org/houxg/leamonax/ui/LaunchActivity.java b/app/src/main/java/org/houxg/leamonax/ui/LaunchActivity.java index 0934ab4..e604cc0 100644 --- a/app/src/main/java/org/houxg/leamonax/ui/LaunchActivity.java +++ b/app/src/main/java/org/houxg/leamonax/ui/LaunchActivity.java @@ -1,9 +1,14 @@ package org.houxg.leamonax.ui; +import android.animation.Animator; import android.app.Activity; import android.content.Intent; import android.os.Bundle; +import android.os.Handler; +import android.view.Window; +import android.view.WindowManager; +import org.houxg.leamonax.R; import org.houxg.leamonax.model.Account; import org.houxg.leamonax.network.ApiProvider; import org.houxg.leamonax.service.AccountService; @@ -13,7 +18,10 @@ public class LaunchActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - Intent intent; + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, + WindowManager.LayoutParams.FLAG_FULLSCREEN); + setContentView(R.layout.activity_launch); + final Intent intent; if (AccountService.isSignedIn()) { Account account = Account.getCurrent(); ApiProvider.getInstance().init(account.getHost()); @@ -22,7 +30,32 @@ protected void onCreate(Bundle savedInstanceState) { intent = new Intent(this, SignInActivity.class); } intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); - startActivity(intent); - finish(); + findViewById(R.id.iv_logo) + .animate() + .scaleX(1.5f) + .scaleY(1.5f) + .setDuration(3000) + .setListener(new Animator.AnimatorListener() { + @Override + public void onAnimationStart(Animator animator) { + + } + + @Override + public void onAnimationEnd(Animator animator) { + startActivity(intent); + finish(); + } + + @Override + public void onAnimationCancel(Animator animator) { + + } + + @Override + public void onAnimationRepeat(Animator animator) { + + } + }).start(); } } diff --git a/app/src/main/res/layout/activity_launch.xml b/app/src/main/res/layout/activity_launch.xml new file mode 100644 index 0000000..3af7cdf --- /dev/null +++ b/app/src/main/res/layout/activity_launch.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file