语言

Menu
Sites
Language
Dali application not restoring the user interface when app is resumed

Hi!

We have made a small app using the Dali C++ library. The app has a simple user interface using one Dali::Toolkit::Control object for background color, two Dali::Toolkit::TextLabel objects and three Dali::Toolkit::ImageView objects for icon display. Most of the time, the app works great. However, sometimes after the display has been off and is turned on again the app user interface is not restored. We know that the app is still running because it makes sounds, but it is impossible to show the app on the screen and it has to be closed from the recent app list. Any ideas on why this happens?

Best regards, Stian

编辑者为: Stian Andre Olsen 11 3月, 2018

响应

2 回复
K Johnson

So far I could understand, you may try using the callbacks for the basic signals provided by the Dali::Application class. Please go through this link. You may save UI of your app in the PauseSignal() function and show it in ResumeSignal() when app becomes visible to user.

Stian Andre Olsen

Thanks!

I am not entirely sure what you mean by saving and restoring the UI. The above mentioned Dali controls are made in a create function as a response to the application's InitSignal. One possibility is to destroy all the UI objects when app is paused and then recreate them when app is resumed. However, this doesn't seem to be the standard Dali way (based on the examples). It also seems to be an unnessesary burden for the developer. The Dali classes should handle whatever is required during pause and resume, and in most cases they do. Everything normally works perfectly when the app is resumed. However, on some rare occasions nothing is shown. My guess is that it is a bug somewhere inside Dali, and I hoped it was a known issue that will be fixed in later editions of the library.

Best regards, Stian