Commit 3f7fbd94 by 严久程

fragment重复创建问题修复

parent 42e6db02
...@@ -190,10 +190,12 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity { ...@@ -190,10 +190,12 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
protected YDLMessageFragment fragment() { protected YDLMessageFragment fragment() {
Bundle arguments = getIntent().getExtras(); Bundle arguments = getIntent().getExtras();
arguments.putSerializable(Extras.EXTRA_TYPE, SessionTypeEnum.P2P); arguments.putSerializable(Extras.EXTRA_TYPE, SessionTypeEnum.P2P);
YDLMessageFragment fragment = new YDLMessageFragment(); if (messageFragment==null){
fragment.setArguments(arguments); messageFragment = new YDLMessageFragment();
fragment.setContainerId(R.id.message_fragment_container); messageFragment.setArguments(arguments);
return fragment; messageFragment.setContainerId(R.id.message_fragment_container);
}
return messageFragment;
} }
@Override @Override
......
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