I have a form with 2 buttons.
result testForm::OnInitializing(void)
{
//creating buttons
m_pButtonOk = new Button();
m_pButtonOk->Construct(Rectangle(100, 0, 200, 100), "Ok");
m_pButtonOk->SetActionId(ID_BUTTON_OK);
m_pButtonOk->AddActionEventListener(*this);
AddControl(m_pButtonOk);
m_pButtonShift= new Button();
m_pButtonShift->Construct(Rectangle(100, 900, 200, 100), "Shift");
m_pButtonShift->SetActionId(ID_BUTTON_SHIFT);
m_pButtonShift->AddActionEventListener(*this);
AddControl(m_pButtonShift);
return E_SUCCESS;
}
void testForm::Shift()
{
//applying shift animation
VisualElementPropertyAnimation shift;
shift.SetStartValue(Variant(FloatPoint(100, 0)));
shift.SetEndValue(Variant(FloatPoint(500, 0)));
shift.SetPropertyName("bounds.position");
shift.SetDuration(3000);
m_pButtonOk->GetVisualElement()->AddAnimation(shift);
}
void
testForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
{
switch(actionId)
{
case ID_BUTTON_OK:
AppLog("OK Button is clicked!\n");
break;
case ID_BUTTON_SHIFT:
AppLog("Shift Button is clicked!\n");
Shift();
break;
default:
break;
}
}When user presses "Shift" button, "Ok" button is moving to a new position. But after animation is ended, Ok button stops working. It changes color when you tap on it, but OnActionPerformed is not firing. Looks like tap region for this event is not changed. What can you advise to me?
UPD
Developing on Tizen SDK 2.1.0 Build id : 20130416-1439, on emulator