package org.ccci.gto.android.common.recyclerview.adapter;

import android.databinding.ViewDataBinding;
import android.support.annotation.NonNull;
import android.view.ViewGroup;

import org.ccci.gto.android.common.recyclerview.adapter.BaseDataBindingAdapter.DataBindingViewHolder;

public abstract class SimpleDataBindingAdapter<B extends ViewDataBinding>
        extends BaseDataBindingAdapter<B, DataBindingViewHolder<B>> {
    // region Lifecycle Events

    @NonNull
    @Override
    public final DataBindingViewHolder<B> onCreateViewHolder(@NonNull final ViewGroup parent, final int viewType) {
        return new DataBindingViewHolder<>(onCreateViewDataBinding(parent, viewType));
    }

    @NonNull
    protected abstract B onCreateViewDataBinding(@NonNull ViewGroup parent, int viewType);

    // end Lifecycle Events
}

@@ -792,16 +792,515 @@
 Type);%0A%0A
+    @Override%0A    public final void onBindViewHolder(@NonNull final DataBindingViewHolder%3CB%3E holder, final int position) %7B%0A        onBindViewDataBinding(holder.binding, position);%0A    %7D%0A%0A    protected abstract void onBindViewDataBinding(B binding, int position);%0A%0A    @Override%0A    public final void onViewRecycled(@NonNull final DataBindingViewHolder%3CB%3E holder) %7B%0A        onViewDataBindingRecycled(holder.binding);%0A    %7D%0A%0A    protected void onViewDataBindingRecycled(@NonNull final B binding) %7B %7D%0A%0A
     // e

add a couple more lifecycle event methods that unwrap the viewholder to the viewdatabinding object