Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

How to create ListView Long click in android xamarin

$
0
0

Hi,

I have working on Long click on ListView Cell. In IOS i have create Renderer and inherit from ViewCellRenderer and create long click functionality using below code.

public override UITableViewCell GetCell (Cell item, UITableViewCell reusableCell, UITableView tv)
{
var cell= base.GetCell (item, reusableCell, tv);
UILongPressGestureRecognizer longGesture = new UILongPressGestureRecognizer (LongGesture);
longGesture.MinimumPressDuration =3;
cell.AddGestureRecognizer (longGesture);
return currentCell= cell;
}
[Export("LongGesture:")]
void LongGesture (UILongPressGestureRecognizer gestureRecognizer)
{

}
its working fine in ios.

But same ListView Long Click functionality need to required in Android. I have try to used using below events functionality

"this.Control.ItemLongClick" and "this.Control.LongClick" and "this.Control.LongClickable = true"

but its not working.

please help.

Thanks


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>