public HeaderListView(Context context, IAttributeSet attrs, HeaderAdapter adapter) : base(context, attrs, adapter) { if (attrs != null) { HeaderTemplateId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, Resource.Styleable.HeaderListView, Resource.Styleable.HeaderListView_HeaderTemplate); } }
public MvxSectionedRecyclerView(Context context, IAttributeSet attrs) : base(context, attrs) { //create the adapter with parameters from attributes var headerTemplateId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance.ExpandableListViewStylableGroupId, MvxAndroidBindingResource.Instance.GroupItemTemplateId); IMvxRecyclerAdapter adapter = new MvxSectionedRecyclerAdapter(false, headerTemplateId); Adapter = adapter; }
public BindableGroupListView(Context context, IAttributeSet attrs, BindableGroupListAdapter adapter) : base(context, attrs, adapter) { var groupTemplateId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance .ListViewStylableGroupId, AndroidBindingResource.Instance .BindableListGroupItemTemplateId); adapter.GroupTemplateId = groupTemplateId; }
public RecurringListView(Context context, IAttributeSet attrs, RecurringAdapter adapter) : base(context, attrs) { var itemTemplateId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance.ListViewStylableGroupId, MvxAndroidBindingResource.Instance.ListItemTemplateId); adapter.ItemTemplateId = itemTemplateId; Adapter = adapter; Adapter.CustomItemClick = this; SetupItemClickListeners(); }
void InitFooters(Context context, IAttributeSet attrs) { var footerId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance.ListViewStylableGroupId, AndroidBindingResource.Instance.MvxListViewWithHeader_FooterLayout); if (footerId != 0) { var bindingContext = MvxAndroidBindingContextHelpers.Current(); var view = bindingContext.BindingInflate(footerId, null); AddFooterView(view, null, false); } }
public MvxListViewWithHeader(Context context, IAttributeSet attrs) : base(context, attrs, null) { var headerId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance.ListViewStylableGroupId, AndroidBindingResource.Instance.MvxListViewWithHeader_HeaderLayout); var footerId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance.ListViewStylableGroupId, AndroidBindingResource.Instance.MvxListViewWithHeader_FooterLayout); var headers = GetFixedViewInfos(headerId); var footers = GetFixedViewInfos(footerId); var adapter = new MvxAdapter(context); adapter.ItemTemplateId = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs); var headerAdapter = new HeaderMvxAdapter(headers, footers, adapter); Adapter = headerAdapter; }
public BindableExpandableListView(Context context, IAttributeSet attrs) : base(context, attrs) { var expandableAdapter = new BindableExpandableListAdapter(context); var groupTemplateId = MvxAttributeHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance .ListViewStylableGroupId, AndroidBindingResource.Instance .BindableListGroupItemTemplateId); var itemTemplateId = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs); expandableAdapter.GroupTemplateId = groupTemplateId; expandableAdapter.ItemTemplateId = itemTemplateId; SetAdapter(expandableAdapter); InitHeaders(context, attrs); InitFooters(context, attrs); }
public static int ReadTemplateId(Context context, IAttributeSet attrs) { return(MvxAttributeHelpers.ReadAttributeValue(context, attrs, Resource.Styleable.ARLinearLayout, Resource.Styleable.ARLinearLayout_MvxItemTemplate)); }
private void ApplyAttributes(Context c, IAttributeSet attrs) { _headerId = MvxAttributeHelpers.ReadAttributeValue(c, attrs, Resource.Styleable.ARListView, Resource.Styleable.ARListView_MvxHeaderTemplate); _footerId = MvxAttributeHelpers.ReadAttributeValue(c, attrs, Resource.Styleable.ARListView, Resource.Styleable.ARListView_MvxFooterTemplate); }