在 Tizen Native 中,视图转换由 naviframe 项 push/pop 管理。
即 elm_naviframe_item_push / elm_naviframe_item_pop
要实现上述视图转换,您可以使用新的 API elm_naviframe_item_push_from。
elm_naviframe_item_push_from 将在 Tizen Studio 4.1 上随 Tizen 5.5 提供
(Tizen Studio 4.0 目前还没有,但 Tizen Studio 4.1 似乎在 2020 年 12 月之前可用。)
由于 UI builder 仅生成代码 elm_naviframe_item_push,我认为您需要手动编写代码 elm_naviframe_item_push_from 而不是 elm_naviframe_item_push。
在使用 elm_naviframe_item_push_from 推送项目后,您上传的视图转换看起来像一个 naviframe 项目弹出案例。
例如
/*
* When the following code is called, view transition from small_image to
* content_with_big_image is started.
* When the view transition is finished, conent_with_big_image is displayed on the screen.
*/
elm_naviframe_item_push_from(naviframe, NULL, NULL, NULL, content_with_big_image, "empty", small_image);
/*
* When naviframe item pop is called (e.g. HW back button) after calling the above code,
* view transition from content_with_big_image to small_image is started.
* When the view transition is finished, the initial view with small_image is displayed
* on the screen.
*/
elm_naviframe_item_pop(naviframe);
谢谢。