언어 설정

Menu
Sites
Language
Genlist Event and Select issues

Hi All,

I am using a genlist. It has items of type TREE.

Aim is to when expand the TREE when selecting the item and toggle the expand state on touch.

I have seen two issues here,

1.) As expected in a normal scenario on desktop environment, I am not getting the "expand,request" signal. 

My handler for this signal is never called. Isn't the TREE item in tizen -2.3 Mobile emiting this signal?

How do I achieve this behavior?

 

2.) On mobile device, when I select an Item in genlist, it gets selected on the first touch. On the subsequent touch it is 'deselected'

is this the right behavior, as on desktop if i select the selected item again, it stays selected.

My aim is to expand the tree on first select and contract the same on subsequent touch. Basically to toggle the tree on every touch.

Any idea on how to achieve this in my program

 

Thanks,

Ashwini

 

Responses

14 댓글
Alex Dem

Hi,
Regarding point 2 : I don't know is it normal default behaviour to select/deselect item, but as is. But Maybe you could add 'select' callback using 'evas_object_smart_callback_add' method or inside 'elm_genlist_item_append' and perform inside callback elm_genlist_item_selected_set(item, EINA_FALSE);
(as for Genlist in native 'UI Controls' example) . So after item was selected, focus will be lost every time.

Also , here is some mentions about tree mode which could be useful for your case:
https://developer.tizen.org/dev-guide/2.3.0/org.tizen.tutorials/html/native/ui/genlist_tutorial_n.htm
Alexey.

Vikram

Hi, regarding point 2, according to the api description of elm_genlist_item_select_mode_set, seems it's behavior is right by default.

 * @remarks elm_genlist_select_mode_set() changes the item select mode.
 *          - ELM_OBJECT_SELECT_MODE_DEFAULT : The item calls their selection @a func and
 *            callback on first getting selected. Any further clicks
 *            do nothing, unless you set the always select mode.

 

Others, can you share your source code here, we can take more testing base on your sample code.

Alex Dem

Hi,
Looks like  elm_genlist_select_mode_set(genlist,ELM_OBJECT_SELECT_MODE_ALWAYS); is exactly what requires for the topic's author to implement point 2. And "selected" callcback occurs on every touch in this case.
Alexey.

colin Rao

Hi,

I've ever encounter similar issues with toolbar widget, I just guess them are the same default implement in Tizen EFL widget. Possibly it's a bug. :)

As the default select mode of genlish, the callback only called at the first touch, and the subsequent touch do nothing. You'll observe such scenario,

First touch: item style with selected (mostly, with a deep background than other items), and callback function called.

Second touch: item style lost, same as other items, and no callbacks.

Third touch: item style with selected, no callbacks.

 

Others, I also checked the genlist item tree mode on IDE help. Also, I think you are just follow the same guide. Suggest you share the sample code here? We can help you to take more testing. :)

Jean Yang

Hi,

For point 1,   the follow way can register "request, expand" singal,

1. register the callbcak

evas_object_smart_callback_add(genlist, "expand,request",_tree_item_expand_request, NULL);
 evas_object_smart_callback_add(genlist, "expanded",_tree_item_expanded, NULL);

2. append item

it = elm_genlist_item_append(genlist, /* genlist object */
     itc, /* item class */
     id, /* item class user data */
     NULL,//parents
     ELM_GENLIST_ITEM_TREE, /* item type */
     _tree_item_expand_request, /* select smart callback , -----register the call back here */
     id); /* smart callback user data */

3, click this level list item, the "expand,request", and "expanded" singal can receive; then you can implement what you want.

Thanks.

 

Dharmesh Guna

Hi Jean Yang,

This worked for the solution.

Dharmesh Guna

Thanks for the solution.

Ashwini Kumar

Hi Yang,

For now I am following the same approach. In the 'selected' callback I am doing 

elm_genlist_item_expanded_set(glit, EINA_TRUE);

But in actual the callback '_tree_item_expand_request' registered thru

evas_object_smart_callback_add(genlist, "expand,request",_tree_item_expand_request, NULL);

have been called. In the above suggestion its getting called in response to 'selected' signal and not 'expand,request'.

I think this is a bug with Tizen mobile, but not sure if it is intended behavior.

Thanx,

Ashwini

Ashwini Kumar

Hi All,

 

I have set the smart callbacks for expand,request and expanded signals.

for #1. Problem is my callback function is not called for expand,request.

The issue is only on mobile.

 

Thanks,

Ashwini

Ashwini Kumar

Hi All,

Another query here, is anybody familiar with the genlist style "slider.main".

I am having an aim to show a 'icon', label and a slider as the list item.

Does this slider.main style help me in any way?

 

Thanx

Ashwini

colin Rao

Hi,

I don't find a genlish style called "slider.main" on IDE help, can you share your stuff here?

As your require, you can use a genlist with item style "full", check the "Widget Styles" section on IDE help. And use a box to compact the icon, label, slider together as a single genlist item, with this way you can customize the UI layout, also you can define a layout via .edc and apply it to the box.

rima rezgui

hello i need heeeelp :/

Dharmesh Guna

Hi Ashwini Kumar,

 

I am also having the same issues you are facing.

Have you found any solution by now?

Thank you

Alex Ashirov

Hi,

If you are asking about the “slider.main”style then you can try to implement you own custom style for such purpose using Edje (edc).