vladexologija vladexologija - 3 months ago 18
Java Question

Android: HorizontalScrollView inside ScrollView

I have multiple HorizontalScrollViews inside a ScrollView. Horizontal scroll isn't smooth at all. I have to scroll almost perfectly horizontally for scrolling to work. Is there a simple fix to tweak this ??? Thanks!

Multiple HorizontalScrollViews inside a single ScrollView


You can use Recycler view with Staggered layout manager

 StaggeredGridLayoutManager  staggeredGridLayoutManager = new StaggeredGridLayoutManager(4, StaggeredGridLayoutManager.HORIZONTAL);

 RecyclerViewAdapter recyclerViewAdapter = newRecyclerViewAdapter(this);

 recyclerView.setAdapter(recyclerViewAdapter); //Don't miss to initialize your adapter