调用 window.getWindowAvoidArea 时抛出异常

​调用 NavPathStack.replacePath 后,在打开的页面 aboutToAppear 中获取 window,后续使用该 window 调用 window.getWindowAvoidArea 方法就会抛   出异常

HarmonyOS
2024-04-29 17:11:10
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
NingJ

getLastWindow接口的功能是获取同context的最上方主窗或子窗。

而目前使用的预期结果是获取主窗口,建议使用windowStage.GetMainWindowSync接口获取。

分享
微博
QQ
微信
回复
2024-04-30 11:06:04
相关问题
JS调用PA出现RemoteInterfaceProxy异常
5015浏览 • 2回复 待解决
window的loadContentByName方法
91浏览 • 1回复 待解决
自定义子 window 大小限制
99浏览 • 1回复 待解决
如何获取主窗口window的宽度
361浏览 • 1回复 待解决
Redistemplate报nullpointer异常
3015浏览 • 1回复 待解决
HarmonyOS中的window怎么设置固定宽高
95浏览 • 1回复 待解决
import Sample 里异常显示
4640浏览 • 1回复 待解决
window 安装 Docker的问题有知道的吗?
857浏览 • 1回复 待解决
@Watch异常有了解的吗?
1136浏览 • 1回复 待解决
如何监听系统应用异常
76浏览 • 1回复 待解决