I am trying to listen to the event when the HorizontalScrollView is scrolled. Tried this but it does not print anything.
HorizontalScrollView he
you can try this, i've tried so many ways, but none of them meet my needs, and then i tried to do it myself, and i succeed , and it seems good , it's smooth.
public class WrapContentListView extends ListView{
public WrapContentListView(Context context) {
super(context);
}
public WrapContentListView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public WrapContentListView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
}