Android setError() message scrolling on top of ActionBar
It is Android OS bug. You can track its progress here
I resolve similiar problem by setting flag
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
I had the same problem. Solved it like this:
private void processingErrorPopupsWhenScrolling(Rect scrollBounds, TextInputEditText... views) {
boolean isViewInFocus = false;
for (TextInputEditText textInputEditText : views) {
if (textInputEditText.getError() != null) {
if (textInputEditText.getLocalVisibleRect(scrollBounds)) {
textInputEditText.setVisibility(View.VISIBLE);
if (!isViewInFocus) {
textInputEditText.requestFocus();
isViewInFocus = true;
}
} else {
textInputEditText.setVisibility(View.INVISIBLE);
}
}
}
}
// in onCreate(){
Rect scrollBounds = new Rect();
mScrollView.getHitRect(scrollBounds);
mScrollView.getViewTreeObserver().addOnScrollChangedListener(() ->
processingErrorPopupsWhenScrolling(scrollBounds,
mLink,
mTitle,
mPrice)
);}