public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, this.BindingContext.LayoutInflaterHolder); var view = this.InflateViewForHolder(parent, viewType, itemBindingContext); return(new DisasterIncidentViewHolder(view, itemBindingContext)); }
public override Object OnCreateHeaderItemViewHolder(ViewGroup p0, int p1) { var itemBindingContext = new MvxAndroidBindingContext(p0.Context, BindingContext.LayoutInflaterHolder); var viewHolder = new MvxRecyclerViewHolder( InflateViewForHolder(HeaderFooterDetails.HeaderLayoutId, p0, p1, itemBindingContext), itemBindingContext) { DataContext = BindingContext.DataContext }; viewHolder.Click += (e, a) => { if (HeaderClickCommand?.CanExecute(viewHolder.DataContext) ?? false) { HeaderClickCommand.Execute(viewHolder.DataContext); } }; viewHolder.LongClick += (e, a) => { if (HeaderLongClickCommand?.CanExecute(viewHolder.DataContext) ?? false) { HeaderLongClickCommand.Execute(viewHolder.DataContext); } }; return(viewHolder); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var view = InflateViewForHolder(parent, viewType, itemBindingContext); return(new PhotosViewHolder(view, itemBindingContext, _itemClickAction)); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var inflatedView = InflateViewForHolder(parent, viewType, itemBindingContext); switch (viewType) { case MainTemplateSelector.Item: return(new MainRecyclerViewLogViewHolder(inflatedView, itemBindingContext) { Click = TimeEntriesLogViewModel.EditCommand, ContinueCommand = TimeEntriesLogViewModel.ContinueTimeEntryCommand }); case MainTemplateSelector.Suggestions: return(new MainRecyclerViewSuggestionsViewHolder(inflatedView, itemBindingContext) { Click = SuggestionsViewModel.StartTimeEntryCommand }); default: return(new MvxRecyclerViewHolder(inflatedView, itemBindingContext)); } throw new ArgumentOutOfRangeException(nameof(viewType), $"Invalid viewType provided to {nameof(MainRecyclerAdapter)}"); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); if (viewType == TypeFooter) { View view = View.Inflate(parent.Context, Resource.Layout.FooterLoading, null); // looks gravity.center can not be written in axml, I have to write it here, I don't know why. LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent); layoutParams.Gravity = GravityFlags.Center; view.LayoutParameters = layoutParams; this.Footer = new FooterHolder(view, itemBindingContext); return(Footer); } else { var vh = new TimelineItemView(InflateViewForHolder(parent, viewType, itemBindingContext), itemBindingContext) { Click = ItemClick, LongClick = ItemLongClick }; return(vh); } }
protected MvxCachingFragmentActivity(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) { BindingContext = new MvxAndroidBindingContext(this, this); this.AddEventListeners(); FragmentCacheConfiguration = new FragmentCacheConfiguration(); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { RecyclerView.ViewHolder viewHolder = null; var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); View view = null; if (viewType == MessageSentType) { view = itemBindingContext.BindingInflate(Resource.Layout.item_sentMessage, parent, false); viewHolder = new SentItemViewHolder(view, itemBindingContext) { }; } else { view = itemBindingContext.BindingInflate(Resource.Layout.item_receivedMessage, parent, false); viewHolder = new ReceivedItemViewHolder(view, itemBindingContext) { }; } return(viewHolder); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { base.OnCreateViewHolder(parent, viewType); var itemBindingContext = new MvxAndroidBindingContext(parent.Context, bindingContext.LayoutInflaterHolder); var holder = new EditPointViewHolder(InflateViewForHolder(parent, viewType, itemBindingContext), itemBindingContext); return(holder); }
public override MvxRecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.PhotoHolder, parent, false); var holder = new PhotoHolder(itemView, itemBindingContext); return(holder); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.VacationRow, parent, false); return(new VacationItemViewHolder(view, itemBindingContext)); }
public override Android.Support.V7.Widget.RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, this.BindingContext.LayoutInflaterHolder); View = this.InflateViewForHolder(parent, viewType, itemBindingContext); return(new MenuItemViewHolder(View, itemBindingContext, OnClick)); }
protected MvxOverlay(Context context) { Context = MvxContextWrapper.Wrap(context, this); BindingContext = new MvxAndroidBindingContext(Context, this); _viewAdapter = new MvxOverlayAdapter(this); }
public override ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var view = InflateViewForHolder(parent, viewType, itemBindingContext); var peopleOnBoardHolder = new ClientListViewHolder(view, itemBindingContext); return(peopleOnBoardHolder); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { RecyclerView.ViewHolder viewHolder = null; var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var view = itemBindingContext.BindingInflate(Resource.Layout.item_myContact, parent, false); viewHolder = new MyContactItemViewHolder(view, itemBindingContext); return(viewHolder); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); return(new CryptoCurrencyViewHolder(InflateViewForHolder(parent, viewType, itemBindingContext), itemBindingContext, _vm, _activity) { Click = ItemClick, LongClick = ItemLongClick }); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, this.BindingContext.LayoutInflaterHolder); View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.task_item, parent, false); return(new TaskItemHolder(itemView, itemBindingContext) { Click = ItemClick }); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.item_user, parent, false); var holder = new UserHolder(itemView, itemBindingContext); holder.SetOnElementClickListener(this); return(holder); }
public override Android.Support.V7.Widget.RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, _bindingContext.LayoutInflaterHolder); return(new MvxRecyclerViewHolder(InflateViewForHolder(parent, viewType, itemBindingContext), itemBindingContext) { Click = ItemClick, LongClick = ItemLongClick }); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var view = InflateViewForHolder(parent, viewType, itemBindingContext); return(new TaskViewHolder(view, itemBindingContext)); //var view = BindingContext.BindingInflate(Resource.Layout.TaskItem, parent); //var itemViewHolder = new TaskViewHolder(view, BindingContext); //return itemViewHolder; }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, this.BindingContext.LayoutInflaterHolder); var view = this.InflateViewForHolder(parent, viewType, itemBindingContext); return(new MonkeyViewHolder(view, itemBindingContext, this) { Click = ItemClick, LongClick = ItemLongClick }); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); View view = InflateViewForHolder(parent, viewType, itemBindingContext); return(new SelectedItemViewHolder(view, itemBindingContext, OnClick) { Click = ItemClick, LongClick = ItemLongClick }); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, this.BindingContext.LayoutInflaterHolder); var view = this.InflateViewForHolder(parent, viewType, itemBindingContext); var holder = new RewardsCategoryCellHolder(view, itemBindingContext) { Click = ItemClick }; return(holder); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); // Create an instance of MyCustomViewHolder instead of MvxViewHolder return(new MyCustomViewHolder(InflateViewForHolder(parent, viewType, itemBindingContext), itemBindingContext) { Click = ItemClick, LongClick = ItemLongClick }); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, this.BindingContext.LayoutInflaterHolder); var view = this.InflateViewForHolder(parent, viewType, itemBindingContext); view.LayoutParameters.Height = parent.MeasuredHeight / 5; return(new HomeRecyclerHolder(view, itemBindingContext) { Click = ItemClick, LongClick = ItemLongClick }); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { Debug.WriteLine("On create view holder"); Debug.WriteLine("View type => " + viewType); Debug.WriteLine("Item template selector => " + ItemTemplateId); Debug.Write("Selector layout id => " + ItemTemplateSelector.GetItemLayoutId(viewType)); base.OnCreateViewHolder(parent, viewType); var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var view = InflateViewForHolder(parent, viewType, itemBindingContext); return(new SkillViewHolder(view, itemBindingContext)); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var inflatedView = InflateViewForHolder(parent, viewType, itemBindingContext); var viewHolder = new SuggestionsRecyclerViewHolder(inflatedView, itemBindingContext) { Click = ItemClick, LongClick = ItemLongClick }; return(viewHolder); }
public View GetInfoContents(Marker marker) { var anno = (marker.Tag as AnnotationTag).Annotation; int?id = GetViewIdForInfoContent(anno); if (id != null) { MvxAndroidBindingContext bindingContext = new MvxAndroidBindingContext(_context, _bindingContext.LayoutInflaterHolder); View view = bindingContext.BindingInflate(id.Value, null); MvxBindingInfoViewHolder vh = GetInfoContentsViewHolder(view, bindingContext); } return(null); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); m_bindingContext = new MvxAndroidBindingContext( this, new LayoutInflaterProvider(LayoutInflater), CreateViewModel()); var view = m_bindingContext.BindingInflate(GetLayoutResourceId(), null); SetContentView(view); }
public override Android.Support.V7.Widget.RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var itemBindingContext = new MvxAndroidBindingContext(parent.Context, BindingContext.LayoutInflaterHolder); var vh = new MvxRecyclerViewHolder(InflateViewForHolder(parent, viewType, itemBindingContext), itemBindingContext) { Click = ItemClick, LongClick = ItemLongClick, Id = ItemTemplateSelector.GetItemLayoutId(viewType) }; return(vh); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // setup the application Setup.Instance.EnsureInitialized(ApplicationContext); _bindingContext = new MvxAndroidBindingContext(this, new LayoutInflaterProvider(LayoutInflater), new FooBarViewModel()); var view = _bindingContext.BindingInflate(Resource.Layout.Main, null); SetContentView(view); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Initialize binding setup BindingSetup.Instance.Initlialize(ApplicationContext); // Create service agent and view model ICustomerServiceAgent serviceAgent = new MockCustomerServiceAgent(); var customerViewModel = new CustomerViewModel(serviceAgent); // Create binding context, passing view model _bindingContext = new MvxAndroidBindingContext(this, this, customerViewModel); // Create view by inflating binding on binding context var view = _bindingContext.BindingInflate(Resource.Layout.Main, null); // Set content view passing inflated view with bindings SetContentView(view); }
public CustomViewElement(Context context) { BindingContext = new MvxAndroidBindingContext(context, (IMvxLayoutInflater)context); }