Support Any Type of items in recyclerview with no pain
compile 'ir.coderz.ghostadapter:GhostAdapter:0.2.1@aar'
public class TextHolder extends RecyclerView.ViewHolder {
private TextView textView;
public TextHolder(View itemView) {
super(itemView);
textView = (TextView) itemView.findViewById(R.id.text);
}
public TextView getTextView() {
return textView;
}
}
@BindItem(layout = R.layout.layout, holder = TextHolder.class)
public class TextItem {
@Binder
public void bind(TextHolder textHolder) {
}
}
GhostAdapter ghostAdapter = new GhostAdapter();
recycler.setAdapter(ghostAdapter);
ghostAdapter.addItem(new TextItem());