Question
Is it possible to create a custom-sized floating window in Tizen without a title bar? I've noticed that in Tizen 2.4 devices, the BankingApps folder opens as a floating window/dialog. I'd like to implement similar functionality in my application.
Answer
Problem Understanding
The user wants to create a floating window with custom dimensions that doesn't occupy the full screen, similar to how some system applications display content. This requires understanding Tizen's window management capabilities and UI components.
Solution Methods
- Using Elm_Popup: The most straightforward method is to use the Elementary Popup component, which can be customized to create floating window-like behavior.
- Window Management API: For more advanced control, you can use Tizen's Window Management API to create and manage custom windows.
- Video Player Implementation: For resizable and movable windows (like in video players), examine the video player's implementation in Tizen's source code.
Code Examples
// Example using Elm_Popup for a floating window
static void create_popup(Evas_Object *parent, char* text) {
Evas_Object *popup = elm_popup_add(parent);
// Set alignment and size hints
elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// Add back button callback
eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, eext_popup_back_cb, parent);
// Set content
elm_object_text_set(popup, text);
// Show the popup
evas_object_show(popup);
}
Additional Tips
- For resizable windows, consider examining the video player implementation in Tizen's source code.
- Remember to handle window focus and stacking order properly when implementing floating windows.
- Test your implementation thoroughly as window management behavior might vary across Tizen versions.