Exemplo n.º 1
0
        void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
        {
            DialogAdapter dialogAdapter = this.ListAdapter as DialogAdapter;
            Element       elem          = dialogAdapter.ElementAtIndex(e.Position);

            if (elem != null && elem.LongClick != null)
            {
                elem.LongClick(sender, e);
            }
        }
Exemplo n.º 2
0
        private void Initialize()
        {
            this.ItemClick += (sender, eventArgs) => {
                Element elem = _dialogAdapter.ElementAtIndex(eventArgs.Position);
                if (elem != null && elem.Click != null)
                {
                    elem.Click(sender, eventArgs);
                }
            };

            this.ItemLongClick += (sender, eventArgs) => {
                Element elem = _dialogAdapter.ElementAtIndex(eventArgs.Position);
                if (elem != null && elem.LongClick != null)
                {
                    elem.LongClick(sender, eventArgs);
                }
            };
        }