Conflict problem when Android Scrollview nested horizontal sliding controls

Preface: today is too laggy in developing, and the outer layer is ScrollView, which is embedded with a sliding calendar control, which is very popular when sliding the calendar. When you see this problem, you will naturally think of the conflict between Scrollview and other slidable controls.

Solution ideas

The user's left and right sliding operation is handled by the outermost Scrollview control, so as long as the Scrollview does not listen to the left and right sliding events, let its child controls handle the left and right sliding events. Override the onintercepttouchevent method of Scrollview, and do not process it when sliding up and down.

The code is as follows

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>