How to use/adapt this with RecyclerView
aresares opened this issue · 1 comments
aresares commented
Hi is it possiblew to use this with RecyclerView.Adapter, I tried like this but I get an error
public class MemoAdapter extends RecyclerView.Adapter<MemoAdapter.MyViewHolder> implements PinnedSectionListView.PinnedSectionListAdapter{
error is here
` @OverRide
public View getView(int position, View convertView, ViewGroup parent) {
TextView view = (TextView) super.getView(position, convertView, parent); <--- ERROR
view.setTextColor(Color.DKGRAY);
view.setTag("" + position);
Main2Activity.Item item = getItem(position);
if (item.type == PinnedSectionListActivity.Item.SECTION) {
//view.setOnClickListener(PinnedSectionListActivity.this);
view.setBackgroundColor(parent.getResources().getColor(COLORS[item.sectionPosition % COLORS.length]));
}
return view;
}`
sebspion commented
3dv ew sk8j 6f