Forum Xamarin.Android

LongClick on map view not fired

imanmohadesi.6653imanmohadesi.6653 USMember ✭✭
edited January 24 in Xamarin.Android

Why LongClick event on MapView not fired???

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
 xmlns:android="http://schemas.android.com/apk/res/android"
 xmlns:tools="http://schemas.android.com/tools"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
     android:descendantFocusability="blocksDescendants">

 <org.neshan.ui.MapView
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:id="@+id/map"
 />

</android.support.constraint.ConstraintLayout>

```
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);

        // Create your application here
        // starting app in full screen
        RequestWindowFeature(WindowFeatures.NoTitle);
        Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);          
        SetContentView(Resource.Layout.AddMarker);
        map = FindViewById<MapView>(Resource.Id.map);

        map.LongClick += Map_LongClick;


    }

    private void Map_LongClick(object sender, View.LongClickEventArgs e)
    {        
         //NOT FIRED WHEN LONG CLICK PRESSED    

    }

```
any help appreciated

Sign In or Register to comment.