mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 10:17:18 +00:00
Cancel splash runnable
This commit is contained in:
parent
667b7666df
commit
1396b2799a
1 changed files with 14 additions and 6 deletions
|
@ -125,15 +125,23 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
|
||||||
long start = new Date().getTime();
|
long start = new Date().getTime();
|
||||||
Log.i("Main boot");
|
Log.i("Main boot");
|
||||||
|
|
||||||
|
final Runnable splash = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
getWindow().setBackgroundDrawableResource(R.drawable.splash);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
final SimpleTask<Boolean> boot = new SimpleTask<Boolean>() {
|
final SimpleTask<Boolean> boot = new SimpleTask<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
protected void onPreExecute(Bundle args) {
|
protected void onPreExecute(Bundle args) {
|
||||||
getMainHandler().postDelayed(new Runnable() {
|
getMainHandler().postDelayed(splash, SPLASH_DELAY);
|
||||||
@Override
|
}
|
||||||
public void run() {
|
|
||||||
getWindow().setBackgroundDrawableResource(R.drawable.splash);
|
@Override
|
||||||
}
|
protected void onPostExecute(Bundle args) {
|
||||||
}, SPLASH_DELAY);
|
getMainHandler().removeCallbacks(splash);
|
||||||
|
getWindow().setBackgroundDrawable(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue