cancel
Showing results for 
Search instead for 
Did you mean: 

Swipe Container: Swipe does not work when start on a Button

Exit0815
Senior

Hello,

i have a swipe container to have the nice animation between "Screens" without scolling some fix containers.

The problem i have is that i have multiple flexbuttons (for changing pages when clicked) inside the swipe container. If i try to swipe the screen on top of the flex-buttons it will not work.

Means, i need a "free space" where i am able to swipe.

Is there any solution or any idea for a workaround?

On my smartphone i can also swipe when i start swiping on an icon of an app and don't need to start swipe on the background :)

Thanks a lot.

1 ACCEPTED SOLUTION

Accepted Solutions
Zwei.9
Associate III

Hi,

Transfer your ClickEvent of button into swipeContianer.

void XXXXX::clickActionButtonHandler(const CustomButton& _btn, const ClickEvent& evt)

{

if (&_btn == &customButton1)

{

mySwipeContainer.handleClickEvent(evt);

if (mySwipeContainer.isAnimating())

return;

}

}

Transfer your DragEventof button into swipeContianer.

void XXXXX::dragActionButtonHandler(const CustomButton& _btn, const DragEvent& evt)

{

if (&_btn == &customButton1)

{

mySwipeContainer.handleDragEvent(evt);

customButton1.toReleaseState();//change pressed state when drag

customButton1.invalidate();

}

}

View solution in original post

2 REPLIES 2
Zwei.9
Associate III

Hi,

Transfer your ClickEvent of button into swipeContianer.

void XXXXX::clickActionButtonHandler(const CustomButton& _btn, const ClickEvent& evt)

{

if (&_btn == &customButton1)

{

mySwipeContainer.handleClickEvent(evt);

if (mySwipeContainer.isAnimating())

return;

}

}

Transfer your DragEventof button into swipeContianer.

void XXXXX::dragActionButtonHandler(const CustomButton& _btn, const DragEvent& evt)

{

if (&_btn == &customButton1)

{

mySwipeContainer.handleDragEvent(evt);

customButton1.toReleaseState();//change pressed state when drag

customButton1.invalidate();

}

}

Thank you very much.

Thats sounds logical and i will test it as soon as i have time.