|
@@ -30,6 +30,8 @@ public class SmallFullVideoActivity extends BaseMvpActivity<SmallFullVideoPresen
|
|
|
@BindView(id = R.id.activity_smallfull_video_back)
|
|
|
ImageView mBack;
|
|
|
private String into_Page;
|
|
|
+ private String data_Json;
|
|
|
+ private boolean isNewIntent = false;
|
|
|
|
|
|
@Override
|
|
|
public int getLayoutId() {
|
|
@@ -67,18 +69,19 @@ public class SmallFullVideoActivity extends BaseMvpActivity<SmallFullVideoPresen
|
|
|
} else {
|
|
|
Bundle params = getIntent().getBundleExtra("params_bundle");
|
|
|
into_Page = params.getString("intoPage");
|
|
|
- String dataJson = params.getString("dataJson");
|
|
|
- if (dataJson.equals("getmmkv")) {
|
|
|
- dataJson = MMKVUtil.getInstance().decodeString("video_data");
|
|
|
+ Logger.e("into_Page:" + into_Page);
|
|
|
+ data_Json = params.getString("dataJson");
|
|
|
+ if (data_Json.equals("getmmkv")) {
|
|
|
+ data_Json = MMKVUtil.getInstance().decodeString("video_data");
|
|
|
}
|
|
|
- initPage(params.getString("index"), dataJson);
|
|
|
+ initPage(params.getString("index"), data_Json);
|
|
|
}
|
|
|
|
|
|
BackPageReceiver.registerReceiver(this, BackPageReceiver.BACK_HOME_REF_VIDEO_ITEM);
|
|
|
BackPageReceiver.registerBackPageReceiverListener(backListener);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public void onGetDisconnect() {
|
|
|
|
|
@@ -134,15 +137,15 @@ public class SmallFullVideoActivity extends BaseMvpActivity<SmallFullVideoPresen
|
|
|
|
|
|
@Override
|
|
|
protected void onResume() {
|
|
|
-
|
|
|
super.onResume();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
BackPageReceiver.onBackPage backListener = new BackPageReceiver.onBackPage() {
|
|
|
@Override
|
|
|
public void pageBack(Intent intent) {
|
|
|
- if (intent.getAction().equals(BackPageReceiver.BACK_HOME_REF_VIDEO_ITEM)) {
|
|
|
+ if (intent.getAction().equals(BackPageReceiver.BACK_HOME_REF_VIDEO_ITEM) && isNewIntent == false) {
|
|
|
//从其他页面回来了。查询一下单独的item数据,然后赋值
|
|
|
mPresenter.refRecordById(intent.getStringExtra("recordId"));
|
|
|
}
|
|
@@ -156,8 +159,32 @@ public class SmallFullVideoActivity extends BaseMvpActivity<SmallFullVideoPresen
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void initPage(String index, String dataJson) {
|
|
|
+ public void initPage(String index, String data_Json) {
|
|
|
+ Logger.e("data_Json:" + data_Json);
|
|
|
mPresenter.setInfoPage(into_Page);
|
|
|
- mPresenter.initFragment(Integer.valueOf(index), dataJson);
|
|
|
+ mPresenter.initFragment(Integer.valueOf(index), data_Json);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onStop() {
|
|
|
+ super.onStop();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onNewIntent(Intent intent) {
|
|
|
+ super.onNewIntent(intent);
|
|
|
+ Logger.e("重复利用页面");
|
|
|
+ isNewIntent = true;
|
|
|
+ into_Page = "";
|
|
|
+ data_Json = "";
|
|
|
+ Bundle params = intent.getBundleExtra("params_bundle");
|
|
|
+ into_Page = params.getString("intoPage");
|
|
|
+ Logger.e("into_Page:" + into_Page);
|
|
|
+ data_Json = params.getString("dataJson");
|
|
|
+ Logger.e("data_Json:" + data_Json);
|
|
|
+ if (data_Json.equals("getmmkv")) {
|
|
|
+ data_Json = MMKVUtil.getInstance().decodeString("video_data");
|
|
|
+ }
|
|
|
+ initPage(params.getString("index"), data_Json);
|
|
|
}
|
|
|
}
|