Please implement easier swipe thresholds (percentages?)

Thread is closed for posting
2 posts, 0 answers
  1. Steve
    Steve avatar
    1885 posts
    Member since:
    Dec 2008

    Posted 10 Jul 2017 Link to this post

    I would love to just be able to define a percentage width for the swipe action instead of needing to do manual conversion math in code.  

    Like it would be much nicer if I could set a percentage or a physical number instead of needing to measure the width and stuff.  It gets confusing because there's multiple measure methods in NativeScript and like you set the threshold in code per the docs on iOS, works okay, but terrible on android so then you have to go in and set cross-platform code.  

    Would just be nicer if it "just worked"

  2. Nikolay Tsonev
    Admin
    Nikolay Tsonev avatar
    340 posts

    Posted 11 Jul 2017 Link to this post

    Hi Steve,

    Indeed this functionality for setting up the percentage for the swipe to execute is not available.

    For your convenience, I logged new feature request in UI for NativeScript feedback repository, where you could keep track on this feature and you could also leave your additional information on the issue.

    In the meantime, you could get the screen width by using platform module and to calculate the percentage manually.

    import {screen} from "platform"
     
    (screen.mainScreen.widthDIPs*20)/100



    Regards,
    nikolay.tsonev
    Progress Telerik
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Back to Top