Android: HorizontalScrollView inside ScrollView

前端 未结 6 1877
忘掉有多难
忘掉有多难 2021-02-05 12:46

I have multiple HorizontalScrollViews inside a ScrollView. Horizontal scroll isn\'t smooth at all. I have to scroll almost perfectly horizontal

6条回答
  •  隐瞒了意图╮
    2021-02-05 13:12

    I've found the solution and still can't believe that this is what you have to do to make this work normal! Just added blank onClickListener to the each item in the HorizontalScrollView:

        item.setOnClickListener(new OnClickListener() {         
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
            }
        });
    

    After this slide is really smooth, both upwards and downwards.

提交回复
热议问题