This is a migrated thread and some comments may be shown as answers.

Please implement easier swipe thresholds (percentages?)

1 Answer 42 Views
ListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 10 Jul 2017, 03:11 PM

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"

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsonev
Telerik team
answered on 11 Jul 2017, 06:34 AM
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.
Tags
ListView
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Nikolay Tsonev
Telerik team
Share this question
or