コード例 #1
0
            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);
            }
コード例 #2
0
            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);
            }
コード例 #3
0
 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;
 }