Design improvements for registration flow.

This commit is contained in:
Nicholas
2023-01-31 09:21:13 -05:00
committed by Nicholas Tinsley
parent cb01692a50
commit c3bcba6380
16 changed files with 115 additions and 65 deletions

View File

@@ -42,12 +42,6 @@ public final class RegistrationNavigationActivity extends AppCompatActivity {
return intent;
}
@Override
protected void attachBaseContext(@NonNull Context newBase) {
getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_NO);
super.attachBaseContext(newBase);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

View File

@@ -9,6 +9,8 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.ScrollView;
import android.widget.Spinner;
import android.widget.Toast;
@@ -126,6 +128,14 @@ public final class EnterPhoneNumberFragment extends LoggingFragment implements R
if (supportActionBar != null) {
supportActionBar.setTitle(null);
}
controller.prepopulateCountryCode();
showKeyboard(number.getEditText());
}
private void showKeyboard(View viewToFocus) {
viewToFocus.requestFocus();
InputMethodManager imm = (InputMethodManager) requireContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(viewToFocus, InputMethodManager.SHOW_IMPLICIT);
}
@Override

View File

@@ -43,6 +43,10 @@ class RegistrationNumberInputController(
spinnerView.addTextChangedListener(CountryCodeEntryListener())
}
fun prepopulateCountryCode() {
spinnerView.setText(supportedCountryPrefixes[0].toString())
}
private fun advanceToPhoneNumberInput() {
if (!isUpdating) {
phoneNumberInputLayout.requestFocus()