// Path: benih/src/main/java/id/zelory/benih/adapter/viewholder/BenihHeaderViewHolder.java
// public abstract class BenihHeaderViewHolder extends BenihItemViewHolder
// {
//     protected Bundle bundle;
// 
//     public BenihHeaderViewHolder(View itemView, Bundle bundle)
//     {
//         super(itemView, null, null);
//         this.bundle = bundle;
//     }
// 
//     @Override
//     public void bind(Object o)
//     {
// 
//     }
// 
//     public abstract void show();
// 
//     public void saveState(Bundle bundle)
//     {
//         this.bundle = bundle;
//     }
// }
// 
// Path: benih/src/main/java/id/zelory/benih/adapter/viewholder/BenihItemViewHolder.java
// public abstract class BenihItemViewHolder<Data> extends RecyclerView.ViewHolder implements
//         View.OnClickListener,
//         View.OnLongClickListener
// {
//     private OnItemClickListener itemClickListener;
//     private OnLongItemClickListener longItemClickListener;
//     private boolean hasHeader = false;
// 
//     public BenihItemViewHolder(View itemView, OnItemClickListener itemClickListener, OnLongItemClickListener longItemClickListener)
//     {
//         super(itemView);
//         ButterKnife.bind(this, itemView);
//         Timber.tag(getClass().getSimpleName());
//         this.itemClickListener = itemClickListener;
//         this.longItemClickListener = longItemClickListener;
//         itemView.setOnClickListener(this);
//         itemView.setOnLongClickListener(this);
//     }
// 
//     public abstract void bind(Data data);
// 
//     public boolean isHasHeader()
//     {
//         return hasHeader;
//     }
// 
//     public void setHasHeader(boolean hasHeader)
//     {
//         this.hasHeader = hasHeader;
//     }
// 
//     @Override
//     public void onClick(View v)
//     {
//         if (itemClickListener != null)
//         {
//             itemClickListener.onItemClick(v, hasHeader ? getAdapterPosition() - 1 : getAdapterPosition());
//         }
//     }
// 
//     @Override
//     public boolean onLongClick(View v)
//     {
//         if (longItemClickListener != null)
//         {
//             longItemClickListener.onLongItemClick(v, hasHeader ? getAdapterPosition() - 1 : getAdapterPosition());
//             return true;
//         }
// 
//         return false;
//     }
// }


import android.content.Context;
import android.os.Bundle;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
import id.zelory.benih.adapter.viewholder.BenihHeaderViewHolder;
import id.zelory.benih.adapter.viewholder.BenihItemViewHolder;
/*
 * Copyright (c) 2015 Zelory.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package id.zelory.benih.adapter;




/**
 * Created on : August 25, 2015
 * Author     : zetbaitsu
 * Name       : Zetra
 * Email      : zetra@mail.ugm.ac.id
 * GitHub     : https://github.com/zetbaitsu
 * LinkedIn   : https://id.linkedin.com/in/zetbaitsu
 */
public abstract class BenihHeaderAdapter<Data, ViewHolder extends BenihItemViewHolder<Data>,
        Header extends BenihHeaderViewHolder> extends
        BenihRecyclerAdapter<Data, BenihItemViewHolder>
{
    protected static final int TYPE_HEADER = 0;
    protected static final int TYPE_ITEM = 1;
// Path: benih/src/main/java/id/zelory/benih/adapter/viewholder/BenihHeaderViewHolder.java
// public abstract class BenihHeaderViewHolder extends BenihItemViewHolder
// {
//     protected Bundle bundle;
// 
//     public BenihHeaderViewHolder(View itemView, Bundle bundle)
//     {
//         super(itemView, null, null);
//         this.bundle = bundle;
//     }
// 
//     @Override
//     public void bind(Object o)
//     {
// 
//     }
// 
//     public abstract void show();
// 
//     public void saveState(Bundle bundle)
//     {
//         this.bundle = bundle;
//     }
// }
// 
// Path: benih/src/main/java/id/zelory/benih/adapter/viewholder/BenihItemViewHolder.java
// public abstract class BenihItemViewHolder<Data> extends RecyclerView.ViewHolder implements
//         View.OnClickListener,
//         View.OnLongClickListener
// {
//     private OnItemClickListener itemClickListener;
//     private OnLongItemClickListener longItemClickListener;
//     private boolean hasHeader = false;
// 
//     public BenihItemViewHolder(View itemView, OnItemClickListener itemClickListener, OnLongItemClickListener longItemClickListener)
//     {
//         super(itemView);
//         ButterKnife.bind(this, itemView);
//         Timber.tag(getClass().getSimpleName());
//         this.itemClickListener = itemClickListener;
//         this.longItemClickListener = longItemClickListener;
//         itemView.setOnClickListener(this);
//         itemView.setOnLongClickListener(this);
//     }
// 
//     public abstract void bind(Data data);
// 
//     public boolean isHasHeader()
//     {
//         return hasHeader;
//     }
// 
//     public void setHasHeader(boolean hasHeader)
//     {
//         this.hasHeader = hasHeader;
//     }
// 
//     @Override
//     public void onClick(View v)
//     {
//         if (itemClickListener != null)
//         {
//             itemClickListener.onItemClick(v, hasHeader ? getAdapterPosition() - 1 : getAdapterPosition());
//         }
//     }
// 
//     @Override
//     public boolean onLongClick(View v)
//     {
//         if (longItemClickListener != null)
//         {
//             longItemClickListener.onLongItemClick(v, hasHeader ? getAdapterPosition() - 1 : getAdapterPosition());
//             return true;
//         }
// 
//         return false;
//     }
// }


// Path: benih/src/main/java/id/zelory/benih/adapter/BenihHeaderAdapter.java
import android.content.Context;
import android.os.Bundle;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
import id.zelory.benih.adapter.viewholder.BenihHeaderViewHolder;
import id.zelory.benih.adapter.viewholder.BenihItemViewHolder;

/*
 * Copyright (c) 2015 Zelory.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package id.zelory.benih.adapter;




/**
 * Created on : August 25, 2015
 * Author     : zetbaitsu
 * Name       : Zetra
 * Email      : zetra@mail.ugm.ac.id
 * GitHub     : https://github.com/zetbaitsu
 * LinkedIn   : https://id.linkedin.com/in/zetbaitsu
 */
public abstract class BenihHeaderAdapter<Data, ViewHolder extends BenihItemViewHolder<Data>,
        Header extends BenihHeaderViewHolder> extends
        BenihRecyclerAdapter<Data, BenihItemViewHolder>
{
    protected static final int TYPE_HEADER = 0;
    protected static final int TYPE_ITEM = 1;
    protected boolean hasHeader = true;