in app/src/main/java/org/apache/fineract/ui/online/customers/createcustomer/customeractivity/CreateCustomerActivity.java [56:89]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActivityComponent().inject(this);
setContentView(R.layout.activity_create_customer);
ButterKnife.bind(this);
createCustomerPresenter.attachView(this);
customerAction = (CustomerAction) getIntent().getSerializableExtra(
ConstantKeys.CUSTOMER_ACTION);
customer = getIntent().getExtras().getParcelable(ConstantKeys.CUSTOMER);
customerIdentifier = getIntent().getExtras().getString(ConstantKeys.CUSTOMER_IDENTIFIER);
if (savedInstanceState != null) {
currentPosition = savedInstanceState.getInt(CURRENT_STEP_POSITION);
}
CreateCustomerStepAdapter stepAdapter = new CreateCustomerStepAdapter(
getSupportFragmentManager(), this, customer, customerAction);
stepperLayout.setAdapter(stepAdapter, currentPosition);
stepperLayout.setListener(this);
stepperLayout.setOffscreenPageLimit(stepAdapter.getCount());
switch (customerAction) {
case CREATE:
customer = new Customer();
setToolbarTitle(getString(R.string.create_customer));
break;
case EDIT:
setToolbarTitle(getString(R.string.edit_customer));
break;
}
showBackButton();
}