// Path: app/src/main/java/com/github/captain_miao/databinding/tutorial/listener/OnViewClickListener.java
// public interface OnViewClickListener  extends View.OnClickListener {
// 
// }
// 
// Path: app/src/main/java/com/github/captain_miao/databinding/tutorial/model/ObservableVehicleInfo.java
// public class ObservableVehicleInfo implements Observable {
// 
//     private boolean isSelected;
//     private String  logoUrl;
//     private String  brand;
//     private String  description;
// 
//     public ObservableVehicleInfo(boolean isSelected, String logoUrl, String brand, String description) {
//         this.isSelected = isSelected;
//         this.logoUrl = logoUrl;
//         this.brand = brand;
//         this.description = description;
//     }
// 
//     public ObservableVehicleInfo(VehicleInfo vehicleInfo) {
//         this.isSelected = vehicleInfo.isSelected.get();
//         this.logoUrl = vehicleInfo.logoUrl;
//         this.brand = vehicleInfo.brand;
//         this.description = vehicleInfo.description;
//     }
// 
//     @Bindable
//     public boolean getIsSelected() {
//         return isSelected;
//     }
// 
//     public void setIsSelected(boolean isSelected) {
//         this.isSelected = isSelected;
//         notifyPropertyChanged(BR.isSelected);
//     }
// 
//     public String getLogoUrl() {
//         return logoUrl;
//     }
// 
//     public void setLogoUrl(String logoUrl) {
//         this.logoUrl = logoUrl;
//     }
// 
//     public String getBrand() {
//         return brand;
//     }
// 
//     public void setBrand(String brand) {
//         this.brand = brand;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
//     //for data binding Observable
//     private transient PropertyChangeRegistry mCallbacks;
//     @Override
//     public synchronized void addOnPropertyChangedCallback(OnPropertyChangedCallback onPropertyChangedCallback) {
//         if (mCallbacks == null) {
//             mCallbacks = new PropertyChangeRegistry();
//         }
//         mCallbacks.add(onPropertyChangedCallback);
//     }
// 
//     @Override
//     public synchronized void removeOnPropertyChangedCallback(OnPropertyChangedCallback onPropertyChangedCallback) {
//         if (mCallbacks != null) {
//             mCallbacks.remove(onPropertyChangedCallback);
//         }
//     }
// 
//     /**
//      * Notifies listeners that all properties of this instance have changed.
//      */
//     public synchronized void notifyChange() {
//         if (mCallbacks != null) {
//             mCallbacks.notifyCallbacks(this, 0, null);
//         }
//     }
// 
//     /**
//      * Notifies listeners that a specific property has changed. The getter for the property
//      * that changes should be marked with {@link Bindable} to generate a field in
//      * <code>BR</code> to be used as <code>fieldId</code>.
//      *
//      * @param fieldId The generated BR id for the Bindable field.
//      */
//     public void notifyPropertyChanged(int fieldId) {
//         if (mCallbacks != null) {
//             mCallbacks.notifyCallbacks(this, fieldId, null);
//         }
//     }
// }


import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import com.github.captain_miao.databinding.tutorial.BR;
import com.github.captain_miao.databinding.tutorial.R;
import com.github.captain_miao.databinding.tutorial.databinding.ObservableRecyclerItemViewBinding;
import com.github.captain_miao.databinding.tutorial.listener.OnViewClickListener;
import com.github.captain_miao.databinding.tutorial.model.ObservableVehicleInfo;
import com.github.captain_miao.recyclerviewutils.BaseWrapperRecyclerAdapter;
import java.util.List;
package com.github.captain_miao.databinding.tutorial.recycleview;





/**
 * @author YanLu
 * @since 16/4/27
 */
public class ObservableVehicleListAdapter extends BaseWrapperRecyclerAdapter<ObservableVehicleInfo, RecyclerView.ViewHolder> {

    public ObservableVehicleListAdapter() {
    }

    public ObservableVehicleListAdapter(List<ObservableVehicleInfo> items) {
        addAll(items);
    }

    @Override
    public RecyclerView.ViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext())
                .inflate(R.layout.observable_recycler_item_view, parent, false);

        return new ObservableVehicleListAdapter.ViewHolder(view);
    }

    @Override
// Path: app/src/main/java/com/github/captain_miao/databinding/tutorial/listener/OnViewClickListener.java
// public interface OnViewClickListener  extends View.OnClickListener {
// 
// }
// 
// Path: app/src/main/java/com/github/captain_miao/databinding/tutorial/model/ObservableVehicleInfo.java
// public class ObservableVehicleInfo implements Observable {
// 
//     private boolean isSelected;
//     private String  logoUrl;
//     private String  brand;
//     private String  description;
// 
//     public ObservableVehicleInfo(boolean isSelected, String logoUrl, String brand, String description) {
//         this.isSelected = isSelected;
//         this.logoUrl = logoUrl;
//         this.brand = brand;
//         this.description = description;
//     }
// 
//     public ObservableVehicleInfo(VehicleInfo vehicleInfo) {
//         this.isSelected = vehicleInfo.isSelected.get();
//         this.logoUrl = vehicleInfo.logoUrl;
//         this.brand = vehicleInfo.brand;
//         this.description = vehicleInfo.description;
//     }
// 
//     @Bindable
//     public boolean getIsSelected() {
//         return isSelected;
//     }
// 
//     public void setIsSelected(boolean isSelected) {
//         this.isSelected = isSelected;
//         notifyPropertyChanged(BR.isSelected);
//     }
// 
//     public String getLogoUrl() {
//         return logoUrl;
//     }
// 
//     public void setLogoUrl(String logoUrl) {
//         this.logoUrl = logoUrl;
//     }
// 
//     public String getBrand() {
//         return brand;
//     }
// 
//     public void setBrand(String brand) {
//         this.brand = brand;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
//     //for data binding Observable
//     private transient PropertyChangeRegistry mCallbacks;
//     @Override
//     public synchronized void addOnPropertyChangedCallback(OnPropertyChangedCallback onPropertyChangedCallback) {
//         if (mCallbacks == null) {
//             mCallbacks = new PropertyChangeRegistry();
//         }
//         mCallbacks.add(onPropertyChangedCallback);
//     }
// 
//     @Override
//     public synchronized void removeOnPropertyChangedCallback(OnPropertyChangedCallback onPropertyChangedCallback) {
//         if (mCallbacks != null) {
//             mCallbacks.remove(onPropertyChangedCallback);
//         }
//     }
// 
//     /**
//      * Notifies listeners that all properties of this instance have changed.
//      */
//     public synchronized void notifyChange() {
//         if (mCallbacks != null) {
//             mCallbacks.notifyCallbacks(this, 0, null);
//         }
//     }
// 
//     /**
//      * Notifies listeners that a specific property has changed. The getter for the property
//      * that changes should be marked with {@link Bindable} to generate a field in
//      * <code>BR</code> to be used as <code>fieldId</code>.
//      *
//      * @param fieldId The generated BR id for the Bindable field.
//      */
//     public void notifyPropertyChanged(int fieldId) {
//         if (mCallbacks != null) {
//             mCallbacks.notifyCallbacks(this, fieldId, null);
//         }
//     }
// }


// Path: app/src/main/java/com/github/captain_miao/databinding/tutorial/recycleview/ObservableVehicleListAdapter.java
import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import com.github.captain_miao.databinding.tutorial.BR;
import com.github.captain_miao.databinding.tutorial.R;
import com.github.captain_miao.databinding.tutorial.databinding.ObservableRecyclerItemViewBinding;
import com.github.captain_miao.databinding.tutorial.listener.OnViewClickListener;
import com.github.captain_miao.databinding.tutorial.model.ObservableVehicleInfo;
import com.github.captain_miao.recyclerviewutils.BaseWrapperRecyclerAdapter;
import java.util.List;

package com.github.captain_miao.databinding.tutorial.recycleview;





/**
 * @author YanLu
 * @since 16/4/27
 */
public class ObservableVehicleListAdapter extends BaseWrapperRecyclerAdapter<ObservableVehicleInfo, RecyclerView.ViewHolder> {

    public ObservableVehicleListAdapter() {
    }

    public ObservableVehicleListAdapter(List<ObservableVehicleInfo> items) {
        addAll(items);
    }

    @Override
    public RecyclerView.ViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext())
                .inflate(R.layout.observable_recycler_item_view, parent, false);

        return new ObservableVehicleListAdapter.ViewHolder(view);
    }

    @Override
    public void onBindItemViewHolder(RecyclerView.ViewHolder holder, int position) {