我正在用JAVA编写一个类,将一个库从Android移植到Harmony OS。在下面给出的安卓代码中,getParent()返回相应视图的ViewParent接口
view.getParent().requestDisallowInterceptTouchEvent(true);
现在,Harmony OS中ViewParent的替代方案是ComponentParent,但它没有类似的匹配方法requestDisallowInterceptTouchEvent()。
在Harmony OS中requestDisallowInterceptTouchEvent()的替代实现是什么?
向您致敬,Subham
发布于 2021-09-21 20:30:45
dispatchTouchEvent,onInterceptTouchEvent - requestDisallowInterceptTouchEvent()方法目前在HarmonyOS中不可用。但这些都可以应用于使用抽象接口的组件。请尝试此示例(如果需要,请进行翻译)。
https://stackoverflow.com/questions/69256876
复制相似问题