Status Update
Comments
al...@android.com <al...@android.com>
[Deleted User] <[Deleted User]> #2
I have same issue, but in addition many a time, when I switch on Bluetooth, the WiFi connection drops.
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #4
Thanks... but that is not the same issue... I can leave wifi on all the time and it will never drop connection. Even when screen blanks out. The wifi will only drop when I turn on bluetooth.
Description
Version used: 23.2.1
Theme used: Theme.AppCompat.Light.DarkActionBar
Devices/Android versions reproduced on: API 16
When clearing error text in TextInputLayout, EditText background color turns black instead of return to its default color.
To reproduce:
final EditText editText = (EditText)findViewById(...);
editText.addTextChangedListener(new TextWatcher()
{
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after)
{ }
@Override
public void onTextChanged(CharSequence s, int start, int before, int count)
{ }
@Override
public void afterTextChanged(Editable s)
{
TextInputLayout textInputLayout = (TextInputLayout)editText .getParent();
if(s.length() == 0)
textInputLayout.setError("Invalid text input!");
else
textInputLayout.setError(null);
}
});
The bug lies in:
TextInputLayout.updateEditTextBackground() private method where you clear EditText's background color filter instead of returning to its default one.
To fix this:
You need to remember the ColorFilter that was set on EditText background before setting error text (thus before setting red color filter).