Commit 3f7fbd94 by 严久程

fragment重复创建问题修复

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