Android Lock does not show more than two custom fields

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.

Hi there @uaftab1, welcome to the Auth0 Community!

When leveraging more than the initial 2 custom fields, are you seeing them populate to a second screen/page as described in the documentation below? If you have any more than 2 custom fields and you fill them out, does it not allow you to submit to the next page until the additional hidden ones are filled? Thanks in advance for you help as we work together to investigate this.

Thanks James. I expected it to behave like iOS lock where the custom fields show up in the same screen as Email and Password. It is not obvious at all that the custom fields appear on the next screen.

And i didn’t notice it on the documentation. it was not obvious.

Thanks for your reply. It solved my problem!

Though i will suggest to make both iOS and Android Locks consistent.

I’m glad to hear it all came together @uaftab1 and thank you for the feedback!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.