语言

Menu
Sites
Language
[CLOSED] How to detect taps from a popup?

Let's say I have an EFL popup window, to display ephemeral information. I would like this popup to auto-close after certain time, but keep the the popup open if the screen is tapped (in other words, tapping the screen resets the timeout timer).

 

I know how to display the popup, I know how to setup the timeout and I know how to close the popup within the timeout callback. I even know how to reset the timeout timer. No problem.

 

I only have one problem. How do I detect the "tap" on the popup window (while keeping the usual feature of the popup window, like flick-to-scroll, to continue to work) ?

 

Platform: Tizen 2.3.2, Gear S3.

Thanks.

编辑者为: James B 28 2月, 2017
查看选择的答案

响应

2 回复
K Johnson

So far I could understand, there's no signal available for this kind of event till now. You may go through the Using the Popup Callbacks section in this link

Note: The signal list in the API reference can be more extensive, but only the signals described in the above mentioned section are actually supported in Tizen.

Mark as answer
James B

Thanks K Johnson. Yes I know there is no signal for that, that's why it becomes a challenge. I've read the links before, that's how I figured out how to do the time out.

 

I spent a lot dead-ends trying to make this to work; from trying to fish out popup's content Evas_Object and assigning event handlers to them; to creating my own Evas_Object with handlers and stuffing them out to popup. NONE of them work corretly.

 

Finally I found an answer that works. It's crude and probably not suitable for anything other than what I'm trying to do, but at least it "works for me" (TM). The way is just simply to capture the event at ecore layer. A suitably placed ecore_event_handler_addecore_event_handler_del gets the job done.