pinned-section-listview
pinned-section-listview copied to clipboard
How to use/adapt this with RecyclerView
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;
}`
3dv ew sk8j 6f