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); }
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; }
public BindableGridView(Android.Content.Context context, IAttributeSet attrs, BindableListAdapter adapter) : base(context, attrs) { Adapter = adapter; SetupItemClickListeners(); }