It is necessary to hide the keyboard when scrolling occurs either up or down. I do this: a piece of markup code
<ScrollView android:id="@+id/scrollViewcontent" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="com.handlingcitizen.handlingcitizen.MainActivity" tools:showIn="@layout/app_bar_main"> I write in activity:
public void hideKeyborScroll() { mScrollView.setOnFocusChangeListener(new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { onClickAway(); } }); } protected void onClickAway() { if (getCurrentFocus() != null) { InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0); } } reaction zero scrolling.
Maybe this is important: in the manifest I registered android:windowSoftInputMode="stateHidden" this parameter is important for me , in the markup for edittext (10pcs) for all your-va
android:focusable="true" android:focusableInTouchMode="true" android:clickable="true"