Commit eb8a6217 authored by jianglx's avatar jianglx

修改导航页推出登录就会重新出现的问题

parent 661d96e1
package com.xxfc.rv; package com.xxfc.rv;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.text.TextUtils; import android.text.TextUtils;
...@@ -81,8 +82,9 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> { ...@@ -81,8 +82,9 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
e.printStackTrace(); e.printStackTrace();
} }
if (Cookie.getBooleanValue(mActivity, "firstOpen", true)) { SharedPreferences preferences = getSharedPreferences("first_open", MODE_PRIVATE);
Cookie.save(mActivity, "firstOpen", false); if (preferences.getBoolean("first", true)) {
preferences.edit().putBoolean("first", false).commit();
startActivity(GuideActivity.getIntent(mActivity)); startActivity(GuideActivity.getIntent(mActivity));
} else { } else {
startActivity(MainActivity.getIntent(mActivity)); startActivity(MainActivity.getIntent(mActivity));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment