// Path: studio-android/LightNovelLibrary/app/src/main/java/org/mewx/wenku8/listener/MyItemClickListener.java
// public interface MyItemClickListener {
//     void onItemClick(View view,int position);
// }
// 
// Path: studio-android/LightNovelLibrary/app/src/main/java/org/mewx/wenku8/listener/MyItemLongClickListener.java
// public interface MyItemLongClickListener {
//     void onItemLongClick(View view,int position);
// }


import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.mewx.wenku8.R;
import org.mewx.wenku8.listener.MyItemClickListener;
import org.mewx.wenku8.listener.MyItemLongClickListener;
import java.util.List;
package org.mewx.wenku8.adapter;




/**
 * Created by MewX on 2015/5/10.
 * Search History Adapter.
 */
public class SearchHistoryAdapter extends RecyclerView.Adapter<SearchHistoryAdapter.ViewHolder> {

    private MyItemClickListener mItemClickListener;
    private MyItemLongClickListener mItemLongClickListener;
    private List<String> history;

    public SearchHistoryAdapter(List<String> h) {
        this.history = h;
    }

    @Override
    @NonNull
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) {
        View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.view_search_history_item,viewGroup,false);
        return new ViewHolder(view, mItemClickListener, mItemLongClickListener);
    }

    public void setOnItemClickListener(MyItemClickListener listener){
        this.mItemClickListener = listener;
    }

// Path: studio-android/LightNovelLibrary/app/src/main/java/org/mewx/wenku8/listener/MyItemClickListener.java
// public interface MyItemClickListener {
//     void onItemClick(View view,int position);
// }
// 
// Path: studio-android/LightNovelLibrary/app/src/main/java/org/mewx/wenku8/listener/MyItemLongClickListener.java
// public interface MyItemLongClickListener {
//     void onItemLongClick(View view,int position);
// }


// Path: studio-android/LightNovelLibrary/app/src/main/java/org/mewx/wenku8/adapter/SearchHistoryAdapter.java
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.mewx.wenku8.R;
import org.mewx.wenku8.listener.MyItemClickListener;
import org.mewx.wenku8.listener.MyItemLongClickListener;
import java.util.List;

package org.mewx.wenku8.adapter;




/**
 * Created by MewX on 2015/5/10.
 * Search History Adapter.
 */
public class SearchHistoryAdapter extends RecyclerView.Adapter<SearchHistoryAdapter.ViewHolder> {

    private MyItemClickListener mItemClickListener;
    private MyItemLongClickListener mItemLongClickListener;
    private List<String> history;

    public SearchHistoryAdapter(List<String> h) {
        this.history = h;
    }

    @Override
    @NonNull
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) {
        View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.view_search_history_item,viewGroup,false);
        return new ViewHolder(view, mItemClickListener, mItemLongClickListener);
    }

    public void setOnItemClickListener(MyItemClickListener listener){
        this.mItemClickListener = listener;
    }

    public void setOnItemLongClickListener(MyItemLongClickListener listener){