Skip to content

Allow disable name field in signup form #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

wangmengyan95
Copy link
Contributor

Allow users to disable name field in the signup form #43
Developers now can disable the name field
1.In the AndroidManifest.xml

<activity
    android:name="com.parse.ui.ParseLoginActivity"
    android:label="@string/app_name"
    android:launchMode="singleTop">
    <meta-data
        android:name="com.parse.ui.ParseLoginActivity.PARSE_SIGNUP_NAME_FIELD_ENABLED"
        android:value="false"/>
</activity>

2.In ParseLoginBuilder

ParseLoginBuilder loginBuilder = new ParseLoginBuilder(getApplicationContext());
loginBuilder.setParseSignupNameFieldEnabled(false);

image

Test:

  1. Do the configuration in AndroidManifest.xml, check whether the name field disable or not, check wether we can signup or not
  2. Do the configuration in ParseLoginBuilder, check whether the name field disable or not, check wether we can signup or not
  3. Do not do any configuration, make sure the name field shows and we can signup

@wangmengyan95 wangmengyan95 force-pushed the wangmengyan.allow_disable_name_field_in_signup_form branch from 4b73404 to e7a58e4 Compare November 18, 2015 23:56
@hallucinogen
Copy link

2 questions here

  1. I assume doing android:name="com.parse.ui.ParseLoginActivity.PARSE_SIGNUP_NAME_FIELD_ENABLED" is the usual pattern here?
  2. What happen if I set the metadata in AndroidManifest.xml to false and call set setParseSignupNameFieldEnabled manually from the code to true?

Otherwise the code LGTM.

@wangmengyan95
Copy link
Contributor Author

@hallucinogen

  1. I think so, I follow the naming convention here.
  2. ParseLoginBuilder's settings will overwrite the settings in AndroidManifest.xml. This is our default behaviour, check here.

@hallucinogen
Copy link

kk LGTM.

wangmengyan95 added a commit that referenced this pull request Nov 19, 2015
…ame_field_in_signup_form

Allow disable name field in signup form
@wangmengyan95 wangmengyan95 merged commit 2db4219 into master Nov 19, 2015
@wangmengyan95 wangmengyan95 deleted the wangmengyan.allow_disable_name_field_in_signup_form branch November 19, 2015 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants