HandlePointerEventL和HandleLongTapEventL的使用
void CMyContainer::HandlePointerEventL(const TPointerEvent& aPointerEvent)
{
// You must tell to long tap detector pointer all events that are received
switch (aPointerEvent.iType)
{
case TPointerEvent::EButton1Down:
{
break;
}
case TPointerEvent::EButton1Up:
{
// button 1 up
break;
}
case TPointerEvent::EDrag:
{
// drag event
break;
}
case TPointerEvent::EMove:
{
// move event
break;
}
default:
{
// do something
break;
}
}
iLongTapDetector->PointerEventL(aPointerEvent);
}
void CMyContainer::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /*aPenEventScreenLocation*/ )
{
// What to do when user did the long tap
}
大家好,请问个问题哈,我对HandlePointerEventL和HandleLongTapEventL的使用 很是迷糊哈
1.短按屏幕的话,我们的流程应该
(1) 检查到EButton1Down,就是按下的那个时候
(2)检查到了EButton1Up ,也就是松开的那个时候
2.长按屏幕的话,流程是不是应该是
(1) 检查到EButton1Down,就是按下的那个时候
(2) 检查到EDrag, 就是正在按着的时候,
(3)检查到了EButton1Up ,也就是松开的那个时候
A.iLongTapDetector->PointerEventL(aPointerEvent);的作用是什么呢
B.iLongTapDetector->PointerEventL(aPointerEvent); 在什么时候会给调用呢。