Exemplo n.º 1
0
        public virtual ListView InitialiseListView(Context context)
        {
            if (_list != null)
            {
                throw new MvxException("You cannot create the list more than once");
            }

            _list = CreateList(context);
            _list.ItemsSource = this.ItemsSource;
            _list.ItemClick = this.ItemClick;
            // for testing some times it helps to see the list!
            // _list.SetBackgroundColor(Color.CornflowerBlue); 
            return _list;
        }
 public MvxListViewSelectedItemTargetBinding(MvxBindableListView view)
 {
     _view = view;
     // note that we use ItemClick here because the Selected event simply does not fire on the Android ListView
     ((ListView) _view).ItemClick += OnItemClick;
 }