mirror of https://github.com/M66B/FairEmail.git
Show splash window after 1500 ms
This commit is contained in:
parent
794f1840a7
commit
26eb0c1f6d
|
@ -25,6 +25,7 @@ import android.content.SharedPreferences;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
@ -51,6 +52,13 @@ public class ActivityMain extends AppCompatActivity implements FragmentManager.O
|
||||||
if (prefs.getBoolean("eula", false)) {
|
if (prefs.getBoolean("eula", false)) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
getWindow().setBackgroundDrawableResource(R.drawable.splash);
|
||||||
|
}
|
||||||
|
}, 1500);
|
||||||
|
|
||||||
new SimpleTask<Boolean>() {
|
new SimpleTask<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
protected Boolean onExecute(Context context, Bundle args) {
|
protected Boolean onExecute(Context context, Bundle args) {
|
||||||
|
|
|
@ -76,10 +76,8 @@
|
||||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||||
<item name="android:windowIsTranslucent">true</item>
|
<item name="android:windowIsTranslucent">true</item>
|
||||||
<item name="android:windowAnimationStyle">@android:style/Animation</item>
|
<item name="android:windowAnimationStyle">@android:style/Animation</item>
|
||||||
</style>
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
<style name="Theme.Splash" parent="Theme.AppCompat.NoActionBar">
|
|
||||||
<item name="android:windowBackground">@drawable/splash</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="checkboxStyle" parent="Base.Widget.AppCompat.CompoundButton.CheckBox">
|
<style name="checkboxStyle" parent="Base.Widget.AppCompat.CompoundButton.CheckBox">
|
||||||
|
|
Loading…
Reference in New Issue