Search code examples
javaandroidhuawei-mobile-serviceshuawei-developersharmonyos

Is there any alternative for setWindowAnimations(Android) in Harmony OS?


I am developing a Harmony application and I want to animate the Dialog window
this code is from android and this type of animation I want to add

Window dialogWindow = dialog.getWindow();
dialogWindow.setWindowAnimations(R.style.CustomDialogAnimation);
// properties that needs to be attached to Dialog window
duration="75"
fromXScale="0"
fromYScale="0"
toXScale="1"
toYScale="1"

I didn't find anything matching documentation like setWindowAnimations.
I tried writing this code but hit a dead end after getting the dialog window. How to add animation properties to this dialog window.

CommonDialog commonDialog = new CommonDialog(getContext);
Window dialogWindow = commonDialog.getWindow();

Is there any other way to code this?


Solution

  • According to the team, HarmonyOS does not currently support to add animation properties to dialog window. Please stay tuned on HarmonyOS official websites.