I have a NestedScrollView contains LinearLayout with orientation vertical, i have adding multiple views programmatically to the linearLayout, after that i need to click on a specific view inside the nestedScrollView and when clicking i need to make the view scrolling to the top of the screen. i used this but it doesnt work
val scrollTo: Int = groupView.bottom //groupView is the view i clicked on and i need to scroll it to the top of the screen
nestedSctollView.smoothScrollTo(0, scrollTo)
try this.