Full screen splash

This commit is contained in:
Eugen Rochko 2017-03-12 14:07:21 +01:00
parent 470b3b1236
commit 4fd941febd

View file

@ -22,6 +22,8 @@ import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.view.Window;
import android.view.WindowManager;
public class SplashActivity extends Activity { public class SplashActivity extends Activity {
private static int SPLASH_TIME_OUT = 2000; private static int SPLASH_TIME_OUT = 2000;
@ -29,7 +31,12 @@ public class SplashActivity extends Activity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_splash); setContentView(R.layout.activity_splash);
/* Determine whether the user is currently logged in, and if so go ahead and load the /* Determine whether the user is currently logged in, and if so go ahead and load the
* timeline. Otherwise, start the activity_login screen. */ * timeline. Otherwise, start the activity_login screen. */
SharedPreferences preferences = getSharedPreferences( SharedPreferences preferences = getSharedPreferences(