0

Disable Swipe in Cardlayout

asked 2014-09-29 12:53:40 +0800

ansancle gravatar image ansancle
317 9

I want to only allow direct control of next/previous on my cardlayouts via buttons I provide. I am trying to disable the feature where the user can swipe the screen on an Ipad and have the next or previous get fired via the swipe. Is there a way to disable swipe on the cardlayout?

I tried messing around with the widgetListeners but no luck so far.

Thanks! Andy

delete flag offensive retag edit

Comments

I found this in the documentation : "Note: On tablet, the data-swipeable is always enabled". I tried to set it to false but as the docs say, it's still swipeable, there HAS to be a way to turn off the swiping.

ansancle ( 2014-10-01 20:28:07 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-10-01 21:00:10 +0800

ansancle gravatar image ansancle
317 9

updated 2014-10-01 21:00:55 +0800

Solved To fix this via java do the following :

public class TestView extends GenericForwardComposer<Window> 
{
    private Cardlayout _cardlayout;

    @Override
    public void doAfterCompose(Window comp) throws Exception
    {

        super.doAfterCompose(comp);
        _cardlayout.setWidgetAttribute("data-swipeable","false");
        _cardlayout.setWidgetAttribute("data-scrollable","false");
    }

Or to fix this in the zul

<cardlayout xmlns:ca="client/attribute" ca:data-swipeable="false" ca:data-scrollable="false"/>
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-09-29 12:53:40 +0800

Seen: 13 times

Last updated: Oct 01 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More