예제 #1
0
        public BindableGridView(Android.Content.Context context) : base(context)
        {
            var adapter = new BindableListAdapter(context);

            adapter.CustomViewTypeCount = _customViewTypeCount;
            Adapter = adapter;

            SetupItemClickListeners();

            _secondaryPool        = new AbsListViewSecondaryPool(TryGetItemViewTypeFromItem, _customViewTypeCount);
            adapter.SecondaryPool = _secondaryPool;
            SetRecyclerListener(_secondaryPool);
        }
예제 #2
0
        private void Initialize(Android.Content.Context context, BindableListAdapter adapter)
        {
            if (adapter == null)
            {
                adapter = new BindableListAdapter(context);

                // The default container supports vertical scrolling
                // and stretching for the whole item.
                adapter.ItemContainerTemplate = () => new ListViewItem()
                {
                    ShouldHandlePressed = false
                };
            }
            IsResetScrollOnItemsSourceChanged = true;
            Adapter = adapter;
        }
예제 #3
0
 public BindableGridView(Android.Content.Context context, IAttributeSet attrs, BindableListAdapter adapter)
     : base(context, attrs)
 {
     Adapter = adapter;
     SetupItemClickListeners();
 }