I want to use great design options in android.support.design but there is a problem.
When I set an action to FocusChanged (setOnFocusChangedListener in android) of my EditText inside the TextInputLayout, TextInputLayout doesn't work correctly and the floating text always stay at top of edittext with accent color.(TextInputLayout doesn't update itself)
Is there any way to solve this problem?!
I'm making my app in xamarin but no problem if you give me java code.
This is true what when you set custom onFocusChangedListener for EditText you override onFocusChangedListener, but you still can use old onFocusChangedListener. To do that you need to get it before override.
final View.OnFocusChangeListener oldNameFocusListener = textInputLayout.getEditText().getOnFocusChangeListener();
textInputLayout.getEditText().setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
oldNameFocusListener.onFocusChange(v, hasFocus);
}
});
This issue can be found in old design library, in new version (v23.0.0), this problem is fixed.