Focusing on a recyclerview item
问题 I am trying to focus on a particular item of a recyclerview. What is the equivalent of the listview.setSelection(position) when using a recyclerview. 回答1: You call RecyclerView.scrollToPosition(position) to request the RecyclerView's LayoutManager to scroll to the given position during the next layout pass (it's asynchronous). To request focusing an item view, the view must be focusable and you call View.requestFocus() . If the view is not yet laid out at the time you want to focus it, you