// Path: library/src/main/java/com/freelib/multiitem/adapter/holder/BaseViewHolder.java
// public class BaseViewHolder extends RecyclerView.ViewHolder {
//     public ViewHolderManager viewHolderManager;
//     public Object itemData;
// 
// 
//     public BaseViewHolder(View itemView) {
//         super(itemView);
//     }
// 
// 
//     public Object getItemData() {
//         return itemData;
//     }
// 
//     /**
//      * header和footer的个数也计算在内
//      * {@link #getAdapterPosition()}
//      */
//     public int getItemPosition() {
//         return getAdapterPosition();
//     }
// 
//     public ViewHolderManager getViewHolderManager() {
//         return viewHolderManager;
//     }
// 
// }
// 
// Path: library/src/main/java/com/freelib/multiitem/common/Const.java
// public class Const {
//     public static final int VIEW_HOLDER_TAG = -121;
// }


import android.util.Log;
import android.view.View;
import com.freelib.multiitem.adapter.holder.BaseViewHolder;
import com.freelib.multiitem.common.Const;
package com.freelib.multiitem.listener;



/**
 * @author free46000  2017/03/16
 * @version v1.0
 */
public class ListenerUtil {
    /**
     * 通过点击的item view获取到BaseViewHolder
     *
     * @return BaseViewHolder
     */
    public static BaseViewHolder getViewHolderByItemView(View view) {
        Object tag = view.getTag(Const.VIEW_HOLDER_TAG);
        if (tag == null || !(tag instanceof BaseViewHolder)) {
// Path: library/src/main/java/com/freelib/multiitem/adapter/holder/BaseViewHolder.java
// public class BaseViewHolder extends RecyclerView.ViewHolder {
//     public ViewHolderManager viewHolderManager;
//     public Object itemData;
// 
// 
//     public BaseViewHolder(View itemView) {
//         super(itemView);
//     }
// 
// 
//     public Object getItemData() {
//         return itemData;
//     }
// 
//     /**
//      * header和footer的个数也计算在内
//      * {@link #getAdapterPosition()}
//      */
//     public int getItemPosition() {
//         return getAdapterPosition();
//     }
// 
//     public ViewHolderManager getViewHolderManager() {
//         return viewHolderManager;
//     }
// 
// }
// 
// Path: library/src/main/java/com/freelib/multiitem/common/Const.java
// public class Const {
//     public static final int VIEW_HOLDER_TAG = -121;
// }


// Path: library/src/main/java/com/freelib/multiitem/listener/ListenerUtil.java
import android.util.Log;
import android.view.View;
import com.freelib.multiitem.adapter.holder.BaseViewHolder;
import com.freelib.multiitem.common.Const;

package com.freelib.multiitem.listener;



/**
 * @author free46000  2017/03/16
 * @version v1.0
 */
public class ListenerUtil {
    /**
     * 通过点击的item view获取到BaseViewHolder
     *
     * @return BaseViewHolder
     */
    public static BaseViewHolder getViewHolderByItemView(View view) {
        Object tag = view.getTag(Const.VIEW_HOLDER_TAG);
        if (tag == null || !(tag instanceof BaseViewHolder)) {
            Log.e("BaseViewHolder", "没有通过item view的tag没获取到ViewHolder");