Example #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;
 }
Example #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;
        }
Example #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;
        }
        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);
            }
        }
Example #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;
        }
        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);
        }
Example #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;
        }
Example #8
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);

            // TODO - sort out long click changes

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