vladexologija vladexologija - 11 days ago 7
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

Answer

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