Exemplo n.º 1
0
        private void TxtSearch_Touch(object sender, View.TouchEventArgs e)
        {
            var rightDrawable = txtSearch.GetCompoundDrawables()[2];

            if (rightDrawable == null || e.Event.Action != MotionEventActions.Up)
            {
                e.Handled = false;
                return;
            }
            if (e.Event.GetX() >= txtSearch.Width - txtSearch.TotalPaddingRight)
            {
                txtSearch.Text = string.Empty;
                e.Handled      = true;
            }
            (sender as AutoCompleteTextView)?.OnTouchEvent(e.Event);
        }