Status Update
Comments
al...@android.com <al...@android.com>
ch...@google.com <ch...@google.com> #3
We're now using a different way to determine if the EditText is focused. For now do something like:
TextInputLayout inputLayout = ...;
EditText editText = inputLayout.getEditText();
final OnFocusChangeListener existing = editText.getOnFocusChangeListener();
editText.setOnFocusChangeListener(new OnFocusChangeListener() {
public void onFocusChange(View view, boolean focused) {
existing.onFocusChange(view, focused);
// Your custom logic
}
});
TextInputLayout inputLayout = ...;
EditText editText = inputLayout.getEditText();
final OnFocusChangeListener existing = editText.getOnFocusChangeListener();
editText.setOnFocusChangeListener(new OnFocusChangeListener() {
public void onFocusChange(View view, boolean focused) {
existing.onFocusChange(view, focused);
// Your custom logic
}
});
ch...@google.com <ch...@google.com> #4
Released in v22.2.1.
mi...@3sstudio.com <mi...@3sstudio.com> #5
The problem still persists for me. I tested on Android 5.1.0 and 4.3
This is my code:
userNameEt = userNameInputLayout.getEditText();
userNameEt.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus){
userInfoValidator.checkUserNameAvailable(userNameEt.getText().toString());
}
}
});
design library version: 'com.android.support:design:22.2.1'
However the workaround with the passing of the focus change listener is working.
Is the solution posted by you the official one or should it work with the new design library version ? I don't know what i'm doing wrong.
Thanks
This is my code:
userNameEt = userNameInputLayout.getEditText();
userNameEt.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus){
userInfoValidator.checkUserNameAvailable(userNameEt.getText().toString());
}
}
});
design library version: 'com.android.support:design:22.2.1'
However the workaround with the passing of the focus change listener is working.
Is the solution posted by you the official one or should it work with the new design library version ? I don't know what i'm doing wrong.
Thanks
ch...@google.com <ch...@google.com> #6
The new method for determining being focusable is in the next release. For now use the method mentioned above.
ch...@google.com <ch...@google.com> #7
Released in the v23 support libs
Description