Search in sources :

Example 1 with DividerWithTextView

use of org.edx.mobile.view.custom.DividerWithTextView in project edx-app-android by edx.

the class RegisterActivity method updateUIOnSocialLoginToEdxFailure.

private void updateUIOnSocialLoginToEdxFailure(SocialFactory.SOCIAL_SOURCE_TYPE socialType, String accessToken) {
    // change UI.
    View signupWith = findViewById(R.id.signup_with_row);
    signupWith.setVisibility(View.GONE);
    View socialPanel = findViewById(R.id.panel_social_layout);
    socialPanel.setVisibility(View.GONE);
    DividerWithTextView signupWithEmailTitle = (DividerWithTextView) findViewById(R.id.or_signup_with_email_title);
    signupWithEmailTitle.setText(getString(R.string.complete_registration));
    // help method
    showRegularMessage(socialType);
    // populate the field with value from social site
    populateEmailFromSocialSite(socialType, accessToken);
    // hide email and password field
    for (IRegistrationFieldView field : this.mFieldViews) {
        String fieldname = field.getField().getName();
        if ("password".equalsIgnoreCase(fieldname)) {
            field.getView().setVisibility(View.GONE);
            this.mFieldViews.remove(field);
            break;
        }
    }
// registrationLayout.requestLayout();
}
Also used : DividerWithTextView(org.edx.mobile.view.custom.DividerWithTextView) DividerWithTextView(org.edx.mobile.view.custom.DividerWithTextView) View(android.view.View) RegistrationEditTextView(org.edx.mobile.module.registration.view.RegistrationEditTextView) TextView(android.widget.TextView) RegistrationSelectView(org.edx.mobile.module.registration.view.RegistrationSelectView) IRegistrationFieldView(org.edx.mobile.module.registration.view.IRegistrationFieldView) ScrollView(android.widget.ScrollView) IRegistrationFieldView(org.edx.mobile.module.registration.view.IRegistrationFieldView)

Aggregations

View (android.view.View)1 ScrollView (android.widget.ScrollView)1 TextView (android.widget.TextView)1 IRegistrationFieldView (org.edx.mobile.module.registration.view.IRegistrationFieldView)1 RegistrationEditTextView (org.edx.mobile.module.registration.view.RegistrationEditTextView)1 RegistrationSelectView (org.edx.mobile.module.registration.view.RegistrationSelectView)1 DividerWithTextView (org.edx.mobile.view.custom.DividerWithTextView)1