I'm trying to get a UI feel like what Apple does with their timer app, the count down timer minutes picker wraps around. Is it possible to wrap/loop like that for the ListPicker component in NativeScript?
I think Timepicker is what you are looking for.
Related
I need a ListView with long pressed event handler.
When listviewItem is longpressed, an popup should appear for example.
Does anyone knows, if this is possible with xamarin.forms MVVM?
Thanks
There is a known issue about this in xamarin forms, you can check it here: [Enhancement] LongPressGestureRecognizer.
And just as this remark mentioned :
this will probably be in .NET MAUI but won't make it into
Xamarin.Forms anymore. If needed check out the Xamarin Community
Toolkit or other relevant libraries
But there are several workarounds:
You can refer to article: Longpress Event For Image In Xamarin.Forms.
And you can also check thread : How to make long press gesture in Xamarin Forms?
I using scnViewGesture.Plugin for xamarin forms. LongTap is working as expected in iOS, but in the Android the LongTap event is not working. please share your inputs.
Why do you need a plugin to do this? Just handle the touch event, start a timer on the down event, clear the timer on the up event, and whenever a specified amount of time has passed on the timer, do whatever you wanted to do with the long touch on a separate thread.
For the record, I can't give you a better example because you've provided no code, and your question is extremely broad because of that.
I want to make a iphone like slide to unlock slider within xamarin forms.
So I want to disable the slider to be clicked on 100%.
I tried to add a tap gesture recognizer but unfortunatly this doesn't work/
Anyone with ideas?
Xamarin Forms can't work with anything more complicated than tap. You have to implement a custom renderer. There is an example which does what you want:
https://github.com/tkowalczyk/SimpleCustomGestureFrame
Using Xamarin.Forms, how do I populate a Picker with items, immediately before the Picker opens?
We have a number of pickers on the same page and it would be inefficient to populate all items upfront, as some of the queries are expensive. For reference, I'm trying to get this working on Xamarin.Android first, and am using the latest stable version - 1.2.36257 at the time of writing.
I've tried:
Focused event - This almost works, but changes to Items are not applied until the next time the Picker opens.
TapGestureRecognizer - The Tapped event doesn't seem to be fired. Perhaps it doesn't work with a Picker.
There's nothing that the Xamarin.Forms Picker exposes from what I can see either, that would allow you to achieve what your wanting.
TapGesture's can be troublesome. For instance I quickly tried it on WindowsPhone, and that is not recognizing the TapGesture either. Your also find some different behavior with different controls as well - with the same response not being uniform across platforms.
I tried hooking into the Picker PropertyChanged / PropertyChanging, and this has the outcome exactly the same as attempting to hook into the Focused event handler that you experienced, with it only working after the picker has initially been displayed.
The only way around this would be to write a custom renderer to achieve what you want to do.
Within that, you could then expose custom events such as OnBeforeAppearing, that would allow you to then pre-load the picker with the items you need from the page at time of use.
I am doing a mobile application in kendo UI. When clicking on the item in the listview its redirecting to some page. My requirement is that for long click also it should redirect to some page.
How can i make it possible in mobile using kendo ui?
Thanks in Advance.
Based on this answer from Kendo UI forums (no native OS events), you could look at this question about Long Press just down the road in SO.
Basically start experimenting with JavaScript events and timers.
As far as I know, JQuery Mobile events (taphold) and plugins are not an option as they would be competing with Kendo UI for page control, but you might get some ideas for your implementation.