Skip to content

This fixes the issue of the hint not showing only on galaxy s5 devices #43

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ private void setEditText(EditText editText) {

@Override
public void afterTextChanged(Editable s) {
setShowHint(!TextUtils.isEmpty(s));
}

@Override
Expand All @@ -128,6 +127,15 @@ public void beforeTextChanged(CharSequence s, int start, int count, int after) {

@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (s.length() == 0) {
if (before == 1) {
setShowHint(false);
} else if (before > 1) {
setShowHint(true);
}
} else {
setShowHint(!TextUtils.isEmpty(s));
}
}

});
Expand Down