1

I am writing a class in JAVA to port a library from Android to Harmony OS. In the Android code given below, getParent() returns a ViewParent interface of the corresponding view

view.getParent().requestDisallowInterceptTouchEvent(true);

Now, the alternative of ViewParent in Harmony OS is ComponentParent, but it doesn't have a similar matching method requestDisallowInterceptTouchEvent().

What is the alternative implementation of requestDisallowInterceptTouchEvent() in Harmony OS?

Regards, Subham

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108

1 Answers1

0

It seems dispatchTouchEvent, onInterceptTouchEvent - requestDisallowInterceptTouchEvent() methods are not available in HarmonyOS for now. But those can be applied to components using abstract interface. Please try this example (with translation if needed).

https://developer.51cto.com/art/202108/677495.htm

Zinna
  • 1,947
  • 2
  • 5
  • 20