@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); command = (InstCommand) this.getIntent().getSerializableExtra(InstCommand.PARAM_COMMAND); if (AssertValue.isNotNull(command) && AssertValue.isNotNullAndNotEmpty(command.getUserid())) { userid = command.getUserid(); } else { userid = sessionManager.getUser().getId(); } queryUserByIdAndSetName(userid); initInstTitle.getTitleLeft().setOnClickListener(onBackClickListener); staffNumLayout.setOnClickListener(onStaffNumClickListener); initInstTitle.getTitleRightTv().setOnClickListener(onInitInstClickListener); }
public static void start(Activity activity, InstCommand command) { Intent intent = new Intent(activity, InitInstActivity.class); Bundle bundle = new Bundle(); bundle.putSerializable(InstCommand.PARAM_COMMAND, command); intent.putExtras(bundle); activity.startActivityForResult(intent, command.getRequestCode()); }