mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-22 21:19:31 +01:00
hide keyboard when scrolling in conversation search
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
1de2261426
commit
edc4091611
@ -44,6 +44,7 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Toast;
|
||||
@ -684,6 +685,7 @@ public class ConversationsListController extends BaseController implements Searc
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private void prepareViews() {
|
||||
layoutManager = new SmoothScrollLinearLayoutManager(Objects.requireNonNull(getActivity()));
|
||||
recyclerView.setLayoutManager(layoutManager);
|
||||
@ -699,6 +701,13 @@ public class ConversationsListController extends BaseController implements Searc
|
||||
}
|
||||
});
|
||||
|
||||
recyclerView.setOnTouchListener((v, event) -> {
|
||||
InputMethodManager imm =
|
||||
(InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
||||
return false;
|
||||
});
|
||||
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> fetchData(false));
|
||||
swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
|
||||
swipeRefreshLayout.setProgressBackgroundColorSchemeResource(R.color.refresh_spinner_background);
|
||||
|
Loading…
Reference in New Issue
Block a user