去除volley 中TAG的滥用导致无法重复加载同一url,项目整理
This commit is contained in:
@ -131,6 +131,7 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
|
||||
|
||||
private boolean isShowDownload = false;
|
||||
private boolean isNewFirstLaunch;
|
||||
private boolean isSkipped;
|
||||
|
||||
private Handler handler = new Handler();
|
||||
|
||||
@ -442,6 +443,7 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putInt("currentTab", currentTab);
|
||||
outState.putBoolean("isSkipped", isSkipped);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -461,9 +463,12 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
|
||||
sp = getSharedPreferences(Config.PREFERENCE, Context.MODE_PRIVATE);
|
||||
isNewFirstLaunch = sp.getBoolean("isNewFirstLaunchV" + PackageUtils.getVersion(getApplicationContext()), true);
|
||||
|
||||
isSkipped = false;
|
||||
|
||||
initViews();
|
||||
if (savedInstanceState != null) {
|
||||
currentTab = savedInstanceState.getInt("currentTab");
|
||||
isSkipped = savedInstanceState.getBoolean("isSkipped");
|
||||
} else if (isNewFirstLaunch) {
|
||||
currentTab = 1;
|
||||
} else {
|
||||
@ -1028,8 +1033,9 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
|
||||
Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//TODO 重复跳转问题
|
||||
if (getIntent() != null && getIntent().getExtras() != null) {
|
||||
if (getIntent() != null && getIntent().getExtras() != null
|
||||
&& !isSkipped) {
|
||||
isSkipped = true;
|
||||
String to = getIntent().getExtras().getString("to");
|
||||
if(!TextUtils.isEmpty(to)){
|
||||
Class<?> clazz = intentClass(to);
|
||||
|
||||
Reference in New Issue
Block a user