11package com .firebase .ui .auth .ui .email ;
22
3+ import android .annotation .SuppressLint ;
4+ import android .os .Build ;
35import android .os .Bundle ;
46import android .support .annotation .NonNull ;
57import android .support .annotation .Nullable ;
@@ -88,6 +90,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
8890 }
8991 }
9092
93+ @ SuppressLint ("NewApi" ) // TODO remove once lint understands Build.VERSION_CODES.O
9194 @ Nullable
9295 @ Override
9396 public View onCreateView (LayoutInflater inflater ,
@@ -96,12 +99,12 @@ public View onCreateView(LayoutInflater inflater,
9699
97100 View v = inflater .inflate (R .layout .fui_register_email_layout , container , false );
98101
99- mEmailEditText = ( EditText ) v .findViewById (R .id .email );
100- mNameEditText = ( EditText ) v .findViewById (R .id .name );
101- mPasswordEditText = ( EditText ) v .findViewById (R .id .password );
102- mAgreementText = ( TextView ) v .findViewById (R .id .create_account_text );
103- mEmailInput = ( TextInputLayout ) v .findViewById (R .id .email_layout );
104- mPasswordInput = ( TextInputLayout ) v .findViewById (R .id .password_layout );
102+ mEmailEditText = v .findViewById (R .id .email );
103+ mNameEditText = v .findViewById (R .id .name );
104+ mPasswordEditText = v .findViewById (R .id .password );
105+ mAgreementText = v .findViewById (R .id .create_account_text );
106+ mEmailInput = v .findViewById (R .id .email_layout );
107+ mPasswordInput = v .findViewById (R .id .password_layout );
105108
106109 mPasswordFieldValidator = new PasswordFieldValidator (
107110 mPasswordInput ,
@@ -117,6 +120,10 @@ public View onCreateView(LayoutInflater inflater,
117120 mPasswordEditText .setOnFocusChangeListener (this );
118121 v .findViewById (R .id .button_create ).setOnClickListener (this );
119122
123+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O && getFlowParams ().enableCredentials ) {
124+ mEmailEditText .setImportantForAutofill (View .IMPORTANT_FOR_AUTOFILL_NO );
125+ }
126+
120127 if (savedInstanceState != null ) {
121128 return v ;
122129 }
0 commit comments