Android RecyclerView scroll to specific word

715 Views Asked by At

I want to scroll to a specific string or index of text. i get search text position and i want to scroll or focus center of screen to my specific string in RecyclerView

I tried to many ways but not solved

now i scroll to like this

LinearLayoutManager llm = (LinearLayoutManager) recyclerView.getLayoutManager();
llm.scrollToPositionWithOffset(row, position);

but it scroll only row of RecyclerView. i need scroll to specific word can some one help me. thank you

1

There are 1 best solutions below

0
On

layoutmanager.scrollToPosition(position);

or

recycler.getLayoutManager().scrollToPosition(position)