I have a list view and in each list item there is a horizontal scroll view. If I scroll a scroll view of an item then it should affect scroll view belongs to all other items in that list view.
Workaround I tried :
mViewHolder.mHorizontalScrollView
.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
selectedItemIndex = mViewHolder.index;
SCROLL_X = v.getScrollX();
SCROLL_Y = v.getScrollY();
mListView.invalidateViews();
return false;
}
});
mViewHolder.mHorizontalScrollView.scrollTo(SCROLL_X, SCROLL_Y);
What u are trying to do is a a grid. Take a look at this its a recyclerview with a CustomLayoutManager this will probably do what u want. btw: recycler is the way to go not listviews any more.