Displaying a List in a Popup Window in Tizen Native Application

Original Created Apr 12, 2018 | Regeneration Apr 22, 2026

I'm trying to display a standard list (not a Genlist) within a popup window in my Tizen native application. Despite trying various combinations, I can't get the list to display properly - only the popup title appears.

Here's my current implementation:

void create_popup(void *data, Evas_Object *obj, void *event_info) {
    Evas_Object *list;
    Evas_Object *parent = obj;

    /* Create the popup */
    Evas_Object *popup = elm_popup_add(parent);
    elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
    evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_object_part_text_set(popup, "title,text", "Title");
    elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER);

    list = elm_list_add(popup);
    elm_list_mode_set(list, ELM_LIST_COMPRESS);
    evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
    
    char tmpString[16];
    sprintf(tmpString, "Reset Game");
    dlog_print(DLOG_INFO, APP_TAG, tmpString);
    elm_list_item_append(list, tmpString, NULL, NULL, NULL, NULL);
    elm_list_item_append(list, tmpString, NULL, NULL, NULL, NULL);

    /* Register the Back key event callback */
    eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, eext_popup_back_cb, NULL);
    /* Show the popup */
    elm_object_content_set(popup, list);
    evas_object_show(popup);
}

I've tried several approaches without success:

  1. Adding a layout and placing the list within it
  2. Creating the list with the parent instead of the popup
  3. Removing all style settings

My goal is to create a menu when the menu button is pressed, similar to the example in the Tizen documentation.

Problem Understanding

The issue occurs when trying to display a standard list (elm_list) within a popup window. While the popup title appears correctly, the list items remain invisible. This is caused by incorrect list mode configuration.

Solution Methods

  1. The primary solution is to change the list mode from ELM_LIST_COMPRESS to ELM_LIST_EXPAND
  2. Ensure proper size hints are set for both the popup and list
  3. Verify the list items are properly appended before setting the content

Code Examples

Here's the corrected implementation:

list = elm_list_add(popup);
/* Change this line from COMPRESS to EXPAND */
elm_list_mode_set(list, ELM_LIST_EXPAND);
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);

/* Add list items */
elm_list_item_append(list, "Reset Game", NULL, NULL, NULL, NULL);
elm_list_item_append(list, "Other Option", NULL, NULL, NULL, NULL);

/* Set list as popup content */
elm_object_content_set(popup, list);

Additional Tips

  • Always check the EFL documentation for proper widget configuration
  • When working with popups, ensure all child elements have proper size hints
  • For more complex menu structures, consider using Elm_Genlist instead of basic lists
  • Test your UI on different device resolutions

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.