Xamarin meets groupie

Yoshihiro Tanaka
May 6 · 1 min read

Installation

Usage

class ListItem : Item
{
private readonly string _title;

public ListItem(string title)
{
_title = title;
}

public override void Bind(Object holder, int position)
{
var viewHolder = (ViewHolder) holder;
var title = viewHolder.Root.FindViewById<TextView>(Resource.Id.title);
title.Text = _title;
}

public override int Layout => Resource.Layout.list_item;
}
var adapter = new GroupAdapter();
adapter.Add(new ListItem("1"));

var recyclerView = FindViewById<RecyclerView>(Resource.Id.recycler_view);
recyclerView.SetLayoutManager(new LinearLayoutManager(this));
recyclerView.SetAdapter(adapter);
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade