I am adding custom fields in Android lock. As per the guideline, I am creating four custom fields:
CustomField firstNameField = new CustomField(R.drawable.ic_input_white_24dp, CustomField.FieldType.TYPE_NAME, "firstName", R.string.first_name_signup);
CustomField lastNameField = new CustomField(R.drawable.ic_input_white_24dp, CustomField.FieldType.TYPE_NAME, "lastName", R.string.last_name_signup);
CustomField companyNameField = new CustomField(R.drawable.ic_input_white_24dp, CustomField.FieldType.TYPE_NAME, "companyName", R.string.company_name_signup);
CustomField projectNameField = new CustomField(R.drawable.ic_input_white_24dp, CustomField.FieldType.TYPE_NAME, "projectNameField", R.string.project_name_signup);
and then adding them to an ArrayList<CustomField>
and passing them to the builder pattern:
mLock = Lock.newBuilder(mAuth0, callback).withAudience(Constant.API_AUDIENCE).withSignUpFields(customFields).hideMainScreenTitle(true).build(this);
The problem is that they don’t show up in the lock signup screen. But when i remove 2 custom fields and then run the code, the remaining two fields show up.
I don’t know the reason why only two custom fields are showing at a given time. Somebody help.