예제 #1
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);
                }
            };
        }
예제 #2
0
        void ListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
        {
            DialogAdapter dialogAdapter = this.ListAdapter as DialogAdapter;
            Element       elem          = dialogAdapter.ElementAtIndex(e.Position);

            if (elem != null && elem.Click != null)
            {
                elem.Click(sender, e);
            }
        }