EditText & ImageButton in swipegesture
<p>I currently have a big activity with multiple edit text &amp; image button.
But when i add a swipe gesture for my navigation all the widget don't raise any click...</p>

<p>Somebody already face this problem and have a solution ?</p>

<p>Thanks.</p>

<p>EDIT add code source :</p>

<p>Here this is the linear layout with the form, the view is very big so i just post the code until the first edittext.</p>

<pre><code>&lt;!-- Form --&gt;
    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:weightSum="100"&gt;
      &lt;Space
          android:layout_width="match_parent"
          android:layout_weight="2"
          android:layout_height="0dp" /&gt;
      &lt;!--Title--&gt;
      &lt;LinearLayout
          android:layout_height="0dp"
          android:layout_weight="10"
          android:layout_width="match_parent"
          android:orientation="horizontal"
          android:weightSum="100"&gt;
        &lt;Space
            android:layout_width="0dp"
            android:layout_weight="2"
            android:layout_height="match_parent" /&gt;
        &lt;Cheer_up_app.Droid.Model.Custom.FontTextView
            android:textColor="@color/white"
            customFont:customFont="Fonts/CarterOne.ttf"
            android:text="@string/title"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="right"
            android:gravity="center_vertical|right"
            android:layout_weight="25" /&gt;
        &lt;Space
            android:layout_width="0dp"
            android:layout_weight="2"
            android:layout_height="match_parent" /&gt;
        &lt;EditText
            android:singleLine="true"
            android:layout_width="0dp"
            android:layout_weight="70"
            android:layout_height="wrap_content"
            android:id="@+id/newchallenge_title"
            android:background="@drawable/border_all"
            android:paddingRight="5dp"
            android:paddingLeft="5dp"
            android:layout_gravity="center_vertical" /&gt;
        &lt;Space
            android:layout_width="0dp"
            android:layout_weight="2"
            android:layout_height="match_parent" /&gt;
&lt;/LinearLayout&gt;
&lt;!-- ect...--&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>Here this is my activity, i did not delete code because i don't know if something i wrote can handle this bug.</p>

<pre><code>namespace Cheer_up_app.Droid.Model
{
    [Activity(Label = "NewChallengeActivity", ScreenOrientation = ScreenOrientation.Portrait, WindowSoftInputMode = SoftInput.AdjustPan)]
    public class NewChallengeActivity : Activity, GestureDetector.IOnGestureListener
    {
        TextView pictureName;
        private Challenge currentChallenge;
        private List&lt;string&gt; hoursList;
        private List&lt;string&gt; daysList;
        private List&lt;Cheer_up_app.Model.Type&gt; challengeType;
        private ChallengeC commonChallenge;
        private int initialSpinnerH;
        private int initialSpinnerD;
        private TimeSpan selectedTimespan;
        private Bitmap helpImage;
        private string type;

        #region gesture declaration
        private GestureDetector _gestureDetector;
        private const int SWIPE_MIN_DISTANCE = 120;
        private const int SWIPE_MAX_OFF_PATH = 250;
        private const int SWIPE_THRESHOLD_VELOCITY = 200;
        #endregion

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


            this.SetContentView(Resource.Layout.NewChallengeView);
            await InitChallenge();

            InitView();

            _gestureDetector = new GestureDetector(this);

        }

        /// &lt;summary&gt;
        /// init challenge object
        /// &lt;/summary&gt;
        private async Task InitChallenge()
        {
            FindViewById&lt;LinearLayout&gt;(Resource.Id.newChallenge_progress_layout).Visibility = ViewStates.Visible;

            currentChallenge = new Challenge();
            commonChallenge = new ChallengeC();
            currentChallenge.Difficulty = CommonResources.Easy;
            currentChallenge.UserId = User.Instance.Id;

            challengeType = await commonChallenge.GetListType();
            TranslateType();
            currentChallenge.ChallengeTypeId = challengeType.FirstOrDefault(ct =&gt; ct.TypeName == CommonResources.Question).Id;
            FindViewById&lt;LinearLayout&gt;(Resource.Id.newChallenge_progress_layout).Visibility = ViewStates.Gone;

        }

        /// &lt;summary&gt;
        /// Init view 
        /// &lt;/summary&gt;
        private void InitView()
        {



            // buttons type
            var buttonQuestion = FindViewById&lt;ImageButton&gt;(Resource.Id.typeQuestion);
            var buttonPhoto = FindViewById&lt;ImageButton&gt;(Resource.Id.typePhoto);
            var buttonVideo = FindViewById&lt;ImageButton&gt;(Resource.Id.typeVideo);


            // buttons level
            var buttonEasy = FindViewById&lt;ImageButton&gt;(Resource.Id.levelEasy);
            var buttonMed = FindViewById&lt;ImageButton&gt;(Resource.Id.levelMed);
            var buttonHard = FindViewById&lt;ImageButton&gt;(Resource.Id.levelHard);

            buttonEasy.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Easy_act), "drawable", PackageName));
            buttonMed.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Medium_des), "drawable", PackageName));
            buttonHard.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Hard_des), "drawable", PackageName));


            // button add photo
            var buttonAdd = FindViewById&lt;ImageButton&gt;(Resource.Id.addPhoto);

            // button next
            var buttonNext = FindViewById&lt;ImageButton&gt;(Resource.Id.imageButtonNext);
            buttonNext.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Next), "drawable", PackageName));


            // button back
            var buttonBack = FindViewById&lt;ImageButton&gt;(Resource.Id.buttonReturnNewChallenge);
            buttonBack.Click += delegate
            {
                OnBackPressed();
            };

            // set one choice for type
            buttonQuestion.Click += delegate
            {
                buttonQuestion.SetImageResource(Resource.Drawable.button_question_enable);
                buttonPhoto.SetImageResource(Resource.Drawable.button_photo_disable);
                buttonVideo.SetImageResource(Resource.Drawable.button_video_disable);
                currentChallenge.ChallengeTypeId = challengeType.FirstOrDefault(ct =&gt; ct.TypeName == CommonResources.Question).Id;
                type = CommonResources.Question;

            };
            buttonPhoto.Click += delegate
            {
                buttonPhoto.SetImageResource(Resource.Drawable.button_photo_enable);
                buttonQuestion.SetImageResource(Resource.Drawable.button_question_disable);
                buttonVideo.SetImageResource(Resource.Drawable.button_video_disable);
                currentChallenge.ChallengeTypeId = challengeType.FirstOrDefault(ct =&gt; ct.TypeName == CommonResources.Photo).Id;
                type = CommonResources.Photo;

            };
            buttonVideo.Click += delegate
            {
                buttonVideo.SetImageResource(Resource.Drawable.button_video_enable);
                buttonQuestion.SetImageResource(Resource.Drawable.button_question_disable);
                buttonPhoto.SetImageResource(Resource.Drawable.button_photo_disable);
                currentChallenge.ChallengeTypeId = challengeType.FirstOrDefault(ct =&gt; ct.TypeName == CommonResources.Video).Id;
                type = CommonResources.Video;

            };

            // set one choice for level
            buttonEasy.Click += delegate
            {
                buttonEasy.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Easy_act), "drawable", PackageName));
                buttonMed.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Medium_des), "drawable", PackageName));
                buttonHard.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Hard_des), "drawable", PackageName));
                currentChallenge.Difficulty = CommonResources.Easy;
            };
            buttonMed.Click += delegate
            {
                buttonEasy.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Easy_des), "drawable", PackageName));
                buttonMed.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Medium_act), "drawable", PackageName));
                buttonHard.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Hard_des), "drawable", PackageName));
                currentChallenge.Difficulty = CommonResources.Medium;

            };
            buttonHard.Click += delegate
            {
                buttonEasy.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Easy_des), "drawable", PackageName));
                buttonMed.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Medium_des), "drawable", PackageName));
                buttonHard.SetImageResource(Resources.GetIdentifier(Resources.GetString(Resource.String.Hard_act), "drawable", PackageName));
                currentChallenge.Difficulty = CommonResources.Hard;

            };

            // choice photo

            pictureName = FindViewById&lt;TextView&gt;(Resource.Id.pictureName);
            pictureName.Visibility = ViewStates.Invisible;

            buttonAdd.Click += delegate
            {
                var imageIntent = new Intent();
                imageIntent.SetType("image/*");
                imageIntent.SetAction(Intent.ActionGetContent);
                StartActivityForResult(Intent.CreateChooser(imageIntent, "Select photo"), 0);
            };


            hoursList = ChallengeFormData.Hours();
            daysList = ChallengeFormData.Days();
            PrepareSpinnersData();
            //prepare spinner
            Spinner spinnerD = (Spinner)FindViewById&lt;Spinner&gt;(Resource.Id.spinnerDay);
            ArrayAdapter adapter = new SpinnerAdapter&lt;string&gt;(this, Android.Resource.Layout.SimpleSpinnerItem, daysList);
            spinnerD.Adapter = adapter;

            Spinner spinnerH = (Spinner)FindViewById&lt;Spinner&gt;(Resource.Id.spinnerHour);
            adapter = new SpinnerAdapter&lt;string&gt;(this, Android.Resource.Layout.SimpleSpinnerItem, hoursList);
            spinnerH.Adapter = adapter;

            initialSpinnerH = spinnerH.SelectedItemPosition;
            initialSpinnerD = spinnerD.SelectedItemPosition;
            //event for spinnners
            spinnerH.ItemSelected += (sender, args) =&gt;
            {
                if (args.Position != initialSpinnerH)
                {
                    spinnerD.SetSelection(0);
                    string selectedHour = spinnerH.SelectedItem.ToString().Split(' ')[0];
                    string hour = string.Empty;
                    if (selectedHour.Length == 3)
                    {
                        hour = selectedHour[0] + "" + selectedHour[1] + ":00";

                    }
                    else
                    {
                        hour = selectedHour[0] + ":00";
                    }
                    TimeSpan.TryParse(hour, out selectedTimespan);
                }
            };

            //event for spinnners
            spinnerD.ItemSelected += (sender, args) =&gt;
            {
                if (args.Position != initialSpinnerH)
                {
                    spinnerH.SetSelection(0);
                    string day = spinnerD.SelectedItem.ToString().Split(' ')[0];
                    TimeSpan.TryParse(day, out selectedTimespan);

                }
            };

        }

        /// &lt;summary&gt;
        /// Traduce typename in each type
        /// &lt;/summary&gt;
        /// &lt;param name="types"&gt;Type list&lt;/param&gt;
        private void TranslateType()
        {
            List&lt;string&gt; typeList = new List&lt;string&gt;();
            foreach (var type in challengeType)
            {
                int resource = Resources.GetIdentifier(type.TypeName, "string", PackageName);
                type.TranslatedTypeName = Resources.GetString(resource);
            }
        }

        /// &lt;summary&gt;
        /// Prepare spinners data adding correct day or hour word
        /// &lt;/summary&gt;
        private void PrepareSpinnersData()
        {
            string days = Resources.GetString(Resource.String.days);
            string hours = Resources.GetString(Resource.String.hours);
            hoursList.Insert(0, Resources.GetString(Resource.String.chooseDuration));
            daysList.Insert(0, Resources.GetString(Resource.String.chooseDuration));

            for (var i=1;i&lt;hoursList.Count; i++)
            {
                hoursList[i] = string.Format("{0} {1}", hoursList[i], hours);
            }

            for (var i = 1; i &lt; daysList.Count; i++)
            {
                daysList[i] = string.Format("{0} {1}", daysList[i], days);
            }
        }

        /// &lt;summary&gt;
        /// Navigate to OnBackPressed
        /// &lt;/summary&gt;
        public override void OnBackPressed()
        {
            base.OnBackPressed();
            this.OverridePendingTransition(Resource.Animation.LeftToRightIn, Resource.Animation.LeftToRightOut);
        }

        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            if (resultCode == Result.Ok)
            {
                pictureName.Visibility = ViewStates.Visible;
                pictureName.Text = data.Data.LastPathSegment;
                helpImage = MediaStore.Images.Media.GetBitmap(ContentResolver, data.Data);
            }
        }

        /// &lt;summary&gt;
        /// Button next, go to friend list
        /// &lt;/summary&gt;
        /// &lt;param name="v"&gt;&lt;/param&gt;
        [Java.Interop.Export("BtnNextChallenge")]
        public void BtnNextChallenge(View v)
        {
            currentChallenge.Title = FindViewById&lt;EditText&gt;(Resource.Id.newchallenge_title).Text;
            currentChallenge.Description = FindViewById&lt;EditText&gt;(Resource.Id.newchallenge_description).Text;

            if (!IsValidated())
            {
                //user already registered, display error message
                AlertDialog.Builder alert = new AlertDialog.Builder(this);
                alert.SetTitle(GetString(Resource.String.emptyAnswer));
                alert.SetMessage(GetString(Resource.String.emptyAnswerText));
                //run the alert in UI thread to display in the screen
                RunOnUiThread(() =&gt; {
                    alert.Show();
                });
                return;
            }

            currentChallenge.ValidityPeriod = selectedTimespan;
            currentChallenge.Points = commonChallenge.CalculPoints(type, currentChallenge.Difficulty);


            Intent activity = new Intent(this, typeof(FriendListActivity));
            activity.PutExtra("NewChallenge", Challenge.ConvertToJson(currentChallenge));
            if(helpImage != null)
            {
                byte[] bitmapData;
                using (var stream = new MemoryStream())
                {
                    helpImage.Compress(Bitmap.CompressFormat.Png, 0, stream);
                    bitmapData = stream.ToArray();
                }
                activity.PutExtra("byteArray", bitmapData);
            }


            StartActivity(activity);
            Finish();
        }

        /// &lt;summary&gt;
        /// Check if challenge is validated
        /// &lt;/summary&gt;
        /// &lt;returns&gt;boolean&lt;/returns&gt;
        private bool IsValidated()
        {
            if(currentChallenge.ChallengeTypeId != 0 &amp;&amp; !string.IsNullOrEmpty(currentChallenge.Description) &amp;&amp; !string.IsNullOrEmpty(currentChallenge.Difficulty) &amp;&amp; !string.IsNullOrEmpty(currentChallenge.Title) &amp;&amp; !string.IsNullOrEmpty(currentChallenge.UserId) &amp;&amp; selectedTimespan != null)
            {
                return true;
            }

            return false;
        }

        #region GestureDetector.IOnGestureListener methods
        public bool OnDown(MotionEvent e)
        {
            return false;
        }

        public bool OnFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
        {
            try
            {
                if (System.Math.Abs(e1.GetY() - e2.GetY()) &gt; SWIPE_MAX_OFF_PATH)
                {
                    return false;
                }

                // right to right swipe
                if (e2.GetX() - e1.GetX() &gt; SWIPE_MIN_DISTANCE &amp;&amp; System.Math.Abs(velocityX) &gt; SWIPE_THRESHOLD_VELOCITY)
                {
                    OnBackPressed();
                }
            }
            catch (System.Exception e)
            {
                Log.Debug("gesture", e.Message);
            }
            return true;
        }

        public void OnLongPress(MotionEvent e)
        {
        }

        public bool OnScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
        {
            return false;
        }

        public void OnShowPress(MotionEvent e)
        {
        }

        public bool OnSingleTapUp(MotionEvent e)
        {
            return false;
        }

        public override bool DispatchTouchEvent(MotionEvent e)
        {
            _gestureDetector.OnTouchEvent(e);
            return false;
        }

        #endregion
    }
}
</code></pre>