// Path: sample-app/src/main/java/ca/antonious/sample/models/SelectableModel.java
// public class SelectableModel {
//     private String name;
// 
//     public SelectableModel(String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     @Override
//     public String toString() {
//         return getName();
//     }
// }
// 
// Path: viewcelladapter/src/main/java/ca/antonious/viewcelladapter/viewcells/GenericViewCell.java
// public abstract class GenericViewCell<TViewHolder extends RecyclerView.ViewHolder, TData> extends AbstractViewCell<TViewHolder> {
//     private TData data;
// 
//     public GenericViewCell(TData data) {
//         setData(data);
//     }
// 
//     public TData getData() {
//         return data;
//     }
// 
//     public void setData(TData data) {
//         this.data = data;
//     }
// 
//     @Override
//     public int getItemId() {
//         return data.hashCode();
//     }
// 
//     @Override
//     public String toString() {
//         return getData().toString();
//     }
// }


import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
import ca.antonious.sample.R;
import ca.antonious.sample.models.SelectableModel;
import ca.antonious.viewcelladapter.viewcells.GenericViewCell;
package ca.antonious.sample.viewcells;



/**
 * Created by George on 2017-01-08.
 */

public class SelectableModelViewCell extends GenericViewCell<SelectableModelViewCell.SelectableModelViewHolder, SelectableModel> {
    public SelectableModelViewCell(SelectableModel selectableModel) {
        super(selectableModel);
    }

    @Override
    public int getLayoutId() {
        return R.layout.selectable_model_list_item;
    }

    @Override
    public void bindViewCell(final SelectableModelViewHolder viewHolder) {
        SelectableModel selectableModel = getData();

        viewHolder.setSelectionToggleListener(null);

        viewHolder.setName(selectableModel.getName());
        viewHolder.setIsSelected(isSelected());

        viewHolder.setSelectionToggleListener(new View.OnClickListener() {
            @Override
// Path: sample-app/src/main/java/ca/antonious/sample/models/SelectableModel.java
// public class SelectableModel {
//     private String name;
// 
//     public SelectableModel(String name) {
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     @Override
//     public String toString() {
//         return getName();
//     }
// }
// 
// Path: viewcelladapter/src/main/java/ca/antonious/viewcelladapter/viewcells/GenericViewCell.java
// public abstract class GenericViewCell<TViewHolder extends RecyclerView.ViewHolder, TData> extends AbstractViewCell<TViewHolder> {
//     private TData data;
// 
//     public GenericViewCell(TData data) {
//         setData(data);
//     }
// 
//     public TData getData() {
//         return data;
//     }
// 
//     public void setData(TData data) {
//         this.data = data;
//     }
// 
//     @Override
//     public int getItemId() {
//         return data.hashCode();
//     }
// 
//     @Override
//     public String toString() {
//         return getData().toString();
//     }
// }


// Path: sample-app/src/main/java/ca/antonious/sample/viewcells/SelectableModelViewCell.java
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
import ca.antonious.sample.R;
import ca.antonious.sample.models.SelectableModel;
import ca.antonious.viewcelladapter.viewcells.GenericViewCell;

package ca.antonious.sample.viewcells;



/**
 * Created by George on 2017-01-08.
 */

public class SelectableModelViewCell extends GenericViewCell<SelectableModelViewCell.SelectableModelViewHolder, SelectableModel> {
    public SelectableModelViewCell(SelectableModel selectableModel) {
        super(selectableModel);
    }

    @Override
    public int getLayoutId() {
        return R.layout.selectable_model_list_item;
    }

    @Override
    public void bindViewCell(final SelectableModelViewHolder viewHolder) {
        SelectableModel selectableModel = getData();

        viewHolder.setSelectionToggleListener(null);

        viewHolder.setName(selectableModel.getName());
        viewHolder.setIsSelected(isSelected());

        viewHolder.setSelectionToggleListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {