public MvxListView(Context context, IAttributeSet attrs, MvxAdapter adapter) : base(context, attrs) { var itemTemplateId = MvxListViewHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance .ListViewStylableGroupId, MvxAndroidBindingResource.Instance .ListItemTemplateId); adapter.ItemTemplateId = itemTemplateId; Adapter = adapter; SetupItemClickListeners(); }
public MvxListView(Context context, IAttributeSet attrs, MvxAdapter adapter) : base(context, attrs) { var itemTemplateId = MvxListViewHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance .ListViewStylableGroupId, MvxAndroidBindingResource.Instance .ListItemTemplateId); adapter.ItemTemplateId = itemTemplateId; Adapter = adapter; SetupItemClickListeners(); }
public MvxGridView(Context context, IAttributeSet attrs, MvxAdapter adapter) : base(context, attrs) { var itemTemplateId = MvxListViewHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance .ListViewStylableGroupId, MvxAndroidBindingResource.Instance .ListItemTemplateId); Adapter = new MvxAdapterWithChangedEvent(context); Adapter.ItemTemplateId = itemTemplateId; Adapter.DataSetChanged += AdapterOnDataSetChanged; this.ChildViewRemoved += OnChildViewRemoved; SetupItemClickListeners(); }
public MvxGridView(Context context, IAttributeSet attrs, MvxAdapter adapter) : base(context, attrs) { var itemTemplateId = MvxListViewHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance .ListViewStylableGroupId, MvxAndroidBindingResource.Instance .ListItemTemplateId); Adapter = new MvxAdapterWithChangedEvent(context); Adapter.ItemTemplateId = itemTemplateId; Adapter.DataSetChanged += AdapterOnDataSetChanged; this.ChildViewRemoved += OnChildViewRemoved; SetupItemClickListeners(); }
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 MvxListViewWithHeader(Context context, IAttributeSet attrs) : base(context, attrs, null) { IMvxAdapter adapter = new MvxAdapter(context); ApplyAttributes(context, attrs); var itemTemplateId = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs); adapter.ItemTemplateId = itemTemplateId; var headers = GetHeaders(); var footers = GetFooters(); IMvxAdapter headerAdapter = new HeaderMvxAdapter(headers, footers, adapter); Adapter = headerAdapter; }
public MvxSpinner(Context context, IAttributeSet attrs, MvxAdapter adapter) : base(context, attrs) { var itemTemplateId = MvxListViewHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance .ListViewStylableGroupId, MvxAndroidBindingResource.Instance .ListItemTemplateId); var dropDownItemTemplateId = MvxListViewHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource .Instance .ListViewStylableGroupId, MvxAndroidBindingResource .Instance .DropDownListItemTemplateId); adapter.ItemTemplateId = itemTemplateId; adapter.DropDownItemTemplateId = dropDownItemTemplateId; Adapter = adapter; SetupHandleItemSelected(); SetupItemClickListeners(); }
public MvxSpinner(Context context, IAttributeSet attrs, MvxAdapter adapter) : base(context, attrs) { var itemTemplateId = MvxListViewHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource.Instance .ListViewStylableGroupId, MvxAndroidBindingResource.Instance .ListItemTemplateId); var dropDownItemTemplateId = MvxListViewHelpers.ReadAttributeValue(context, attrs, MvxAndroidBindingResource .Instance .ListViewStylableGroupId, MvxAndroidBindingResource .Instance .DropDownListItemTemplateId); adapter.ItemTemplateId = itemTemplateId; adapter.DropDownItemTemplateId = dropDownItemTemplateId; Adapter = adapter; SetupHandleItemSelected(); SetupItemClickListeners(); }