I am writing a class in JAVA to port a library from Android to Harmony OS. In the Android code given below for the method onSelectedY(boolean, float, int), it requires a constructor of the class AccelerateInterpolator to be added to a method.
For equivalent Harmony OS component of class AccelerateInterpolator, there is an interface named Animator.TimelineCurve. But the issue with it being an interface is that it doesn't have a constructor, which is needed in this case. If I directly use the interface, I would have to override the interface here itself, but that can't be done as there is nothing to override manually.
Same goes for OvershootInterpolator.
What could be the work-around for this case?
Regards, Subham
Create the query with harmonyos tag in stackoverflow and share the link here:
Developer Platform: Windows
DevEco Studio version: 2.1.0.303
SDK API version: 5
SDK version: 2.1.1.21
Device: Not required
Device OS version: Not required
Describe the query
I am writing a class in JAVA to port a library from Android to Harmony OS. In the Android code given below for the method
onSelectedY(boolean, float, int)
, it requires a constructor of the classAccelerateInterpolator
to be added to a method.For equivalent Harmony OS component of class
AccelerateInterpolator
, there is an interface namedAnimator.TimelineCurve
. But the issue with it being an interface is that it doesn't have a constructor, which is needed in this case. If I directly use the interface, I would have to override the interface here itself, but that can't be done as there is nothing to override manually.Same goes for
OvershootInterpolator
.What could be the work-around for this case?
Regards, Subham
Create the query with harmonyos tag in stackoverflow and share the link here:
https://stackoverflow.com/questions/69159281/what-is-the-alternative-class-in-harmony-os-for-accelerateinterpolator-and-overs
Additional information
Developer Platform: Windows DevEco Studio version: 2.1.0.303 SDK API version: 5 SDK version: 2.1.1.21 Device: Not required Device OS version: Not required
Regards, Subham