rxjava 启动页跳到首页

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_35506618/article/details/82218075
 Observable.timer(2, TimeUnit.SECONDS)
            .observeOn(AndroidSchedulers.mainThread())
            .compose(this.<Long>bindUntilEvent(ActivityEvent.DESTROY))
            .subscribe(new Consumer<Long>() {
                @Override
                public void accept(@NonNull Long aLong) throws Exception {
                    AccountActivity.show(SplashActivity.this);
                    finish();
                }
            });
} else {
    //到检查登录页面
    AccountActivity.show(SplashActivity.this);
    finish();
}

猜你喜欢

转载自blog.csdn.net/qq_35506618/article/details/82218075