public override ListViewHolder OnCreateItemViewHolder(ViewGroup parent, int viewType) { LayoutInflater inflater = LayoutInflater.From(parent.Context); View itemView = inflater.Inflate(Resource.Layout.example_list_view_data_operations_item_layout, parent, false); ItemViewHolder customHolder = new ItemViewHolder(itemView); return(customHolder); }
public override void OnBindItemViewHolder(ListViewHolder holder, Java.Lang.Object entity) { ItemViewHolder vh = (ItemViewHolder)holder; ShoppingListItem item = (ShoppingListItem)entity; vh.txtItemCategory.Text = Java.Lang.String.Format("Category: %s", item.category); vh.txtItemName.Text = item.name; vh.txtItemPrice.Text = Java.Lang.String.Format("Price: $%d", item.price); }
public override ListViewHolder OnCreateItemViewHolder(ViewGroup parent, int viewType) { LayoutInflater inflater = LayoutInflater.From(parent.Context); View itemView = inflater.Inflate(Resource.Layout.example_list_view_data_operations_item_layout, parent, false); ItemViewHolder customHolder = new ItemViewHolder(itemView); return customHolder; }