long-press

Xamarin Forms Custom GridView Tap and Long Tap Not Working Together

て烟熏妆下的殇ゞ 提交于 2019-12-11 19:26:48
问题 I want to use tap and long tap together with Custom Gridview. Tap is working but long tap not working. it also works when one tap turns off the long tap. Please help me. Thank you. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Adding long press gesture recognizer in Xamarin forms

给你一囗甜甜゛ 提交于 2019-12-11 09:54:09
问题 Could you please let me know how can I recognize long press gesture in Xamarin Forms application? This is my xaml page which i created referring to this thread: Xamarin.forms.DataGrid <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:DataGridSample_01" xmlns:dg="clr-namespace:Xamarin.Forms.DataGrid;assembly=Xamarin.Forms.DataGrid" x:Class="DataGridSample_01.MainPage"> <ContentView BackgroundColor="White

UILabel - Long press gesture for menu item of UIMenuController

我们两清 提交于 2019-12-11 07:32:20
问题 I need to handle long press action/gesture on UILable, in an entire app, and it should show a menu like this, with custom menu options: As per apple interface guideline a text field, a text view, a web view, and an image view can only enable this menu. Is it feasible to add such action in UILabel for the entire app and open custom menu by adding own menu options, with existing? 回答1: Here is a UILabel subclass that handles long pressing to show the UIMenuController . You can also add more

Long Touch on a surfaceView ( android )

两盒软妹~` 提交于 2019-12-09 11:18:46
问题 I'm making a game on Android and I need to do certain actions when the users attempts a long press on the screen. Unfortunately I haven't found any methods that works directly with a custom SurfaceView, feel free to tell me if such a method exists :) So I decided to try and implement a long touch detection from the onTouch event listener. here is my code: @Override public boolean onTouch(View v, MotionEvent event) { long touchDuration = 0; if ( event.getAction() == MotionEvent.ACTION_DOWN ) {

Xamarin.Forms Long Press Effect - How to set the Command in Code Behind (NO XAML)

烂漫一生 提交于 2019-12-07 07:14:23
I'm using this solution for handling the long tap event: https://alexdunn.org/2017/12/27/xamarin-tip-xamarin-forms-long-press-effect/ It works fine when I use XAML, but I need to use code behind only. How can I add this command to the Image in the code behind? Here is the code that creates my image: var image = new Image { ClassId = item.Path, Aspect = Aspect.AspectFill, Source = item.ThumbNailImage, Rotation = 90, Margin = 10, GestureRecognizers = { _tgr }, //Command here, but how? }; This documentation on Microsoft's website is very helpful in explaining how to set attached properties in

long press quick setting tile in android

为君一笑 提交于 2019-12-06 07:18:09
问题 I am new to android development. Trying to make a tile service, but I have trouble to overriding the default long press action. For that, I have a class called QSTileService which extends TileService , and I want my tile to do different things depending on if you press or long press it. what ive found so far with buttons is to implement the OnLongClickListener interface and fill in what you want to do in the onLongClick method, but im not sure how to do this with quick setting tiles? any help

How to display a button on long press of a list item

大憨熊 提交于 2019-12-05 03:10:27
问题 I need to display a delete button on long press of a list item.. I've got the code for long press.. but don't know how to code for displaying a button inside this long press... 回答1: Finally got the answer... .xml file <ImageButton android:id="@+id/imgdelete" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/delete" android:visibility="invisible"/> .java file lv.setOnItemLongClickListener(new OnItemLongClickListener() { @Override public boolean

long press quick setting tile in android

∥☆過路亽.° 提交于 2019-12-04 16:57:27
I am new to android development. Trying to make a tile service, but I have trouble to overriding the default long press action. For that, I have a class called QSTileService which extends TileService , and I want my tile to do different things depending on if you press or long press it. what ive found so far with buttons is to implement the OnLongClickListener interface and fill in what you want to do in the onLongClick method, but im not sure how to do this with quick setting tiles? any help will be appreciated Sandip Kothari as per Documentation : Long clicking on your quick settings tile

Android : How to implement longpress manually in touch event?

对着背影说爱祢 提交于 2019-12-04 14:17:04
问题 Short version: I want a way to start a time-based counter on an onTouchEvent, and test to see if a certain amount of time has passed before responding, as a manual LongTouch detection. Explanation: I have a custom imageView that slides in/out of screen on two-fingered flings. I want to add drag events to it, but these need to be quicker than a longpress. I can delay the drag event by using a counter that updates once per onTouchEvent and only triggers the drag on, say, 10 counts, but the

Combining jQuery Mobile taphold and jQuery UI draggable

亡梦爱人 提交于 2019-12-04 07:33:10
I'm working on a mobile application where I'm trying to combine jQuery UI's draggable functionality with jQuery Mobile's taphold event. The idea is that an element becomes draggable when a taphold is executed. Draggable is being initialized on elements in the following code: $('div.rect', '#outerBox').draggable({ containment: "parent", grid: [50, 50], disabled: true, stop: function(event, ui) { $(this).draggable('disable'); $(this).removeClass('highlighted'); } }); As you can see the draggable functionality is disabled initially, because I want to enable it after a taphold event. To achieve