hanzixi

Results 6 comments of hanzixi

李老师 抱歉回复晚了 我简单看了下preview_ui; preview_ui中使用的是open ,等于重新打开了一个窗口; 下面的demo是我自己新建的一个简单的demo,一共三个页面,home_page,window1和window2;home_page一共有两个按钮,绑定的事件风别是打开window1和window2,window1和window2各有两个按钮,一个按钮是关闭当前窗口,另外一个是切换到home_page,使用的是window_manager_switch_to函数,测试发现使用该接口就没有了关闭该窗口的动画;而使用window_close就有动画;具体您可以看下下面这个简单的demo,谢谢您; [window_test.zip](https://github.com/zlgopen/awtk/files/8139813/window_test.zip) (如果下载无法解压,可以将后缀名修改为.rar)

的确是的 homo_page没有设定动画; 如何动态的将其他窗口的关闭动画设置给home_page呢?能否通过widget_set_prop接口设置?设置完之后调用window_manager_switch_to会有动画效果?我们的需求就是关闭的窗口控件的数据得以保留,关闭窗口的时候要有相应的动画效果;另外就是window_open接口是每次都打开一个新的窗口,不管之前是否打开过,能否做到已经打开的窗口(后台运行)不再打开新的,而且打开之前已经打开过的?这样也可以节省内存;谢谢

李老师,通过widget_get_prop和widget_set_prop接口可以将窗口window1的动画设置给home_page,实现代码如下: static ret_t on_switch_windows_click(void *ctx, event_t *e) { widget_t *win = WIDGET(ctx); (void)ctx; (void)e; value_t v; bool_t open = FALSE; const char *anim_hint = NULL; const char *key = open...

根据awtk源码,修改之后增加了自定义动画,实现切换窗口时候的反向动画,增加了open windows和switch windows的兼容处理,打开窗口的时候先查找下,如果没有打开这使用window_open接口,如果已经打开则使用switch_to接口,这样原先界面的数据还都存在;demo工程如下: [window_test.zip](https://github.com/zlgopen/awtk/files/8177169/window_test.zip) ![image](https://user-images.githubusercontent.com/71420611/156550714-bf639a26-87c9-496c-be01-01dda1c800e9.png) ![image](https://user-images.githubusercontent.com/71420611/156550772-5f8a022e-8b4e-4e0e-b564-758089d34eb9.png) ![image](https://user-images.githubusercontent.com/71420611/156550821-394403bf-25c2-4a9b-b1b0-3475db903eac.png) https://user-images.githubusercontent.com/71420611/156551244-6c6497f8-f98b-45b7-810e-e88f9b7b9d0f.mp4

Yes, I did see this [feedback](https://github.com/philippe44/AirConnect/issues/377) on this issue before, but it didn't help; Warmly looking forward to your new firmware, I hope it can successfully adapt to Huawei sound;...