|
|
@@ -11,12 +11,15 @@ import com.lidroid.xutils.view.annotation.ViewInject;
|
|
|
import com.xzjmyk.pm.activity.R;
|
|
|
import com.xzjmyk.pm.activity.ui.MainActivity;
|
|
|
import com.xzjmyk.pm.activity.ui.base.BaseActivity;
|
|
|
+import com.xzjmyk.pm.activity.ui.erp.util.Constants;
|
|
|
+import com.xzjmyk.pm.activity.ui.groupchat.AutoCreateChatFragment;
|
|
|
import com.xzjmyk.pm.activity.ui.groupchat.GroupChatFragment;
|
|
|
|
|
|
public class CommonFragmentActivity extends BaseActivity {
|
|
|
|
|
|
@ViewInject(R.id.fl_content)
|
|
|
private FrameLayout fl_content;
|
|
|
+ private int type;
|
|
|
|
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
@@ -32,10 +35,21 @@ public class CommonFragmentActivity extends BaseActivity {
|
|
|
* @author:Administrator on 2016/2/17 10:34
|
|
|
*/
|
|
|
public void initView() {
|
|
|
- GroupChatFragment groupChatFrament = new GroupChatFragment();
|
|
|
- FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
|
|
- fragmentTransaction.replace(R.id.fl_content, groupChatFrament);
|
|
|
- fragmentTransaction.commit();
|
|
|
+ type=getIntent().getIntExtra("type", Constants.TYPE_CHAT_All);
|
|
|
+ switch (type){
|
|
|
+ case Constants.TYPE_CHAT_All:
|
|
|
+ GroupChatFragment groupChatFrament = new GroupChatFragment();
|
|
|
+ FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
|
|
+ fragmentTransaction.replace(R.id.fl_content, groupChatFrament);
|
|
|
+ fragmentTransaction.commit();
|
|
|
+ break;
|
|
|
+ case Constants.TYPE_CHAT_MANAGE:
|
|
|
+ AutoCreateChatFragment manageChatFrament = new AutoCreateChatFragment();
|
|
|
+ fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
|
|
+ fragmentTransaction.replace(R.id.fl_content, manageChatFrament);
|
|
|
+ fragmentTransaction.commit();
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|