package com.lgvalle.material_animations;

import android.databinding.BindingAdapter;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;

/**
 * Created by lgvalle on 04/09/15.
 */
public class Sample {

    int color;
    String name;
    Drawable icon;
    View.OnClickListener onClickListener;

    public Sample(Drawable icon, int color, String name) {
        this.icon = icon;
        this.color = color;
        this.name = name;
    }

    @BindingAdapter("bind:colorFilter")
    public static void setColorFilter(ImageView view, int color) {
        view.setColorFilter(color);
    }

    public String getName() {
        return name;
    }

    public Drawable getIcon() {
        return icon;
    }

    public int getColor() {
        return color;
    }

    public View.OnClickListener getOnClickListener() {
        return onClickListener;
    }
}

@@ -97,93 +97,54 @@
 oid.
-graphics.drawable.Drawable;%0Aimport android.view.
+widget.Image
 View;%0A
+%0A
 import 
-android.widget.ImageView
+java.io.Serializable
 ;%0A%0A/
@@ -205,16 +205,40 @@
  Sample 
+implements Serializable 
 %7B%0A%0A    i
@@ -267,69 +267,8 @@
 ame;
-%0A    Drawable icon;%0A    View.OnClickListener onClickListener;
 %0A%0A  
@@ -287,23 +287,8 @@
 ple(
-Drawable icon, 
 int 
@@ -313,34 +313,8 @@
 ) %7B%0A
-        this.icon = icon;%0A
     
@@ -593,205 +593,53 @@
 lic 
-Drawable getIcon() %7B%0A        return icon;%0A    %7D%0A%0A    public int getColor() %7B%0A        return color;%0A    %7D%0A%0A    public View.OnClickListener getOnClickListener() %7B%0A        return onClickListener;%0A    %7D
+int getColor() %7B%0A        return color;%0A    %7D%0A%0A
 %0A%7D%0A

Remove onClick from Sample and make it Serializable