Skip to content
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

[MDC-101] Should use TextWatcher instead of OnKeyListener for listening to text changes inside EditText #61

Open
kdb13 opened this issue Sep 10, 2020 · 0 comments

Comments

@kdb13
Copy link

kdb13 commented Sep 10, 2020

Describe the bug
In MDC-101, when the password text field is being listened for text changes, the codelab is using an OnKeyListener, which should not be used as its documentation says that it will only detect hardware key presses and not software key presses.

Although it works in some cases, it might not always for every device.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codelabs.developers.google.com/codelabs/mdc-101-java/#4
  2. Click on `Step 5 - Navigate to the next fragment'
  3. Scroll down to LoginFragment.java and see the implementation of onCreateView()
  4. See that an OnKeyListener is being set to passwordEditText.

Expected behavior
The implementation should be TextWatcher instead of OnKeyListener.

Codelab details (please complete the following information about the codelab):

@kdb13 kdb13 changed the title [MDC-101] Should use TextWatcher instead of OnKeyListener [MDC-101] Should use TextWatcher instead of OnKeyListener for listening to text changes inside EditText Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant