语言

Menu
Sites
Language
ITouchEventListener recognition

Hi, Tizen Developers. 

I have some problems, so ask your advice. 

I have been developing home application. 

 

** Image Link.

 

First, I define ContainerPanel class. 

ContainerPanel class’s size is (720 * 5, 1280), and include some PagePanel(720, 1280) with sliding animation.

next, I define custom button class. (class name is AppIconButton implements ITouchEventListener and ITouchLongPressGestureEventListener)

When I add AppIconButton in PagePanel, it cannot recognize ITouchEventListener and ITouchLongPressGestureEventListener.

Of course, ContainerPanel's IPropagatedTouchEventListener is recognized, but I want to recognize AppIconButton's EventListener.

I don't know how to solve this problem. :(

What's problem?

 

** When I test AppIconButton on 'Form', it works very well. 

 

class ContainerPanel: public Tizen::Ui::Container,

        public Tizen::Ui::IPropagatedTouchEventListener { 

//to do...

};

 

class PagePanel: public Tizen::Ui::Container{

//to do...

}

 

class AppIconButton: public Tizen::Ui::Container,

        public Tizen::Ui::ITouchEventListener,

        public Tizen::Ui::ITouchLongPressGestureEventListener{

//to do...

}

 

编辑者为: 가빈 이 02 12月, 2014

响应

1 回复
Alex Dem

Hi,
I don't work on 2.2.1 now   (And I don't have 2.2.1 SDK to check) because of it is deprecated but I could suppose that you should use Tizen::Ui::Control::AddTouchEventListener to registerer listener:
https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/classTizen_1_1Ui_1_1Control.html#a5abcde872fe0843b04b40e56840ea3d6

AddTouchEventListener is applicable for classes inherited from Controls (usually this listener is used for ready controls : Forms, Panels, buttons, headers e.t.c.)
But maybe I have missed something.
Alexey.