What are similar class for below objects in Harmony OS?

155 Views Asked by At

Please help me for similar classes for 1. AppBarLayout, 2.Interpolator(with setInterpolator method), 3. BitmapFactory.decodeResource(res, id), 4. SpannableString, 5. ReplacementSpan in HarmonyOS.

2

There are 2 best solutions below

0
Zinna On BEST ANSWER
  1. For Interpolator/setInterpolator try using Animator/AnimatorProperty setCurveType(curveType)

By default it is a linear interpolator but you can set other types as well. Please check -

https://developer.harmonyos.com/en/docs/documentation/doc-references/animatorproperty-0000001054439987#ZH-CN_TOPIC_0000001054439987__setCurveType-int-

  1. For BitmapFactory.decodeResource(res, id) : you can use ImageSource and createPixelmap. Something like-

enter image description here

2
zhangxaochen On

In addition to the BitMapFactory.decodeResource and ImageSource.createPixelmap method classes, No other class can find a similar type in Harmony OS by now.

For details about image decoding, see the following website development guide: https://developer.harmonyos.com/en/docs/documentation/doc-guides/media-image-decoding-0000000000031770?ha_source=hms1