コード例 #1
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     this.DialogAdapter           = new DialogAdapter(this, Root);
     this.ListAdapter             = this.DialogAdapter;
     this.ListView.ItemClick     += ListView_ItemClick;
     this.ListView.ItemLongClick += ListView_ItemLongClick;
 }
コード例 #2
0
        public DialogHelper(Context context, ListView dialogView, RootElement root)
        {
            root.Context = context;

            dialogView.Adapter        = this.DialogAdapter = new DialogAdapter(context, root);
            dialogView.ItemClick     += new EventHandler <ItemEventArgs>(ListView_ItemClick);
            dialogView.ItemLongClick += new EventHandler <ItemEventArgs>(ListView_ItemLongClick);
            dialogView.Tag            = root;
        }
コード例 #3
0
        public DialogHelper(Context context, ListView dialogView, RootElement root)
        {
            this.Root         = root;
            this.Root.Context = context;

            dialogView.Adapter        = this.DialogAdapter = new DialogAdapter(context, this.Root);
            dialogView.ItemClick     += ListView_ItemClick;
            dialogView.ItemLongClick += ListView_ItemLongClick;;
            dialogView.Tag            = root;
        }
コード例 #4
0
        void ListView_ItemClick(object sender, ItemEventArgs e)
        {
            DialogAdapter dialogAdapter = this.ListAdapter as DialogAdapter;
            Element       elem          = dialogAdapter.ElementAtIndex(e.Position);

            if (elem != null && elem.Click != null)
            {
                elem.Click(sender, e);
            }
        }
コード例 #5
0
        public DialogHelper(Context context, ListView dialogView, RootElement root)
        {
            this.Root         = root;
            this.Root.Context = context;

            dialogView.Adapter    = this.DialogAdapter = new DialogAdapter(context, this.Root);
            dialogView.ItemClick += ListView_ItemClick;
            // FIXME: should I comment out this? some branch seems to have done it.
            dialogView.ItemLongClick += ListView_ItemLongClick;;
            dialogView.Tag            = root;
        }
コード例 #6
0
        bool ListView_ItemLongClick(AdapterView parent, View view, int position, long id)
        {
            DialogAdapter dialogAdapter = this.ListAdapter as DialogAdapter;
            Element       elem          = dialogAdapter.ElementAtIndex(position);

            /* TODO: FIX
             * if (elem != null && elem.LongClick != null)
             *  elem.LongClick(parent, );
             */
            return(true);
        }
コード例 #7
0
        public DialogHelper(Context context, ListView dialogView, RootElement root)
        {
            this.Root         = root;
            this.Root.Context = context;

            dialogView.Adapter        = this.DialogAdapter = new DialogAdapter(context, this.Root);
            dialogView.ItemClick     += new EventHandler <AdapterView.ItemClickEventArgs>(ListView_ItemClick);
            dialogView.ItemLongClick += ListView_ItemLongClick;
            dialogView.Scroll        += delegate(object sender, AbsListView.ScrollEventArgs e) {
                Console.WriteLine("Item Count " + e.View.Count);
            };

            dialogView.Tag = root;
        }
コード例 #8
0
ファイル: DialogHelper.cs プロジェクト: zwxu999/MvvmCross
        public DialogHelper(Context context, ListView dialogView, RootElement root)
        {
            root.Context = context;

            dialogView.Adapter    = this.DialogAdapter = new DialogAdapter(context, root);
            dialogView.ItemClick += new EventHandler <ItemEventArgs>(ListView_ItemClick);

            // TODO - sort out long click changes

            /*
             * dialogView.ItemLongClick = new AdapterView.ItemLongClickHandler(ListView_ItemLongClick);
             * dialogView.ItemLongClick += new EventHandler<ItemEventArgs>(ListView_ItemLongClick);
             */
            dialogView.Tag = root;
        }