언어 설정

Menu
Sites
Language

Use Clicked, Double-Clicked and Longpressed for Items in a genlist

Hello. I would like to use all variants of "using" an Item in a genlist to work with it. - click on Item - double-click - longpressed I solved my problem with a timer to identify a single click. It works, but why start the timer in the unselect func and not in the selected func ? Ideas ?

Responses

2 댓글
K Johnson

Hi Claus Giehl,

To capture events like longpressed, doubleclick on genlist items, you don't need to implement timer or gl_unselected function. It's handled by genlist itself as it handles other events i.e. select event. You just need to implement corresponding callbacks for this. 

For longpressed event, implement below function,

static void gl_longpressed_cb(void *data, Evas_Object *obj, void *event_info)

For doubleclick event, implement this function below,

static void doubleclick(void *data, Evas_Object *obj, void *event_info)

It'll also work accordingly. You may go through the genlist.c file of UIComponents sample app from Tizen Studio. It holds detail implementation of genlist features.

N.B: Please post your questions in forums instead of code snippets section.

Claus Giehl

Hi K Johnson.

Your right. It is possible to catch longpressed and doubleclick callbacks. But together with a click-event this click-event is always running, too.

 

P.S.: Sorry for the wrong section - I´m not used to work in those forums and sections.
As I found so many questions and answers I thought it´s correct.