<commit_before>package com.omega_r.omegarecyclerview.pagination_example;

import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.Toast;

import com.omega_r.libs.omegarecyclerview.OmegaRecyclerView;
import com.omega_r.libs.omegarecyclerview.pagination.PaginationViewCreator;
import com.omega_r.omegarecyclerview.R;

import java.util.ArrayList;
import java.util.List;

public class ImageAdapter extends OmegaRecyclerView.Adapter<ImageAdapter.ViewHolder> implements PaginationViewCreator {

    private List<Image> mList = new ArrayList<>();
    @Nullable
    private Callback mCallback;

    public ImageAdapter() {
        setHasStableIds(true);
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_image, parent, false));
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        holder.imageView.setImageResource(mList.get(position).getImageRes());
    }

    public void addValues(List<Image> list) {
        mList.addAll(list);
        notifyItemInserted(mList.size() - list.size());
    }


    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public int getItemCount() {
        return mList.size();
    }

    @Nullable
    @Override
    public View createPaginationView(ViewGroup parent, LayoutInflater inflater) {
        return inflater.inflate(R.layout.item_progress, parent, false);
    }

    @Nullable
    @Override
    public View createPaginationErrorView(ViewGroup parent, LayoutInflater inflater) {
        View view = inflater.inflate(R.layout.item_error_loading, parent, false);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mCallback != null) {
                    mCallback.onRetryClicked();
                }<commit_msg>Fixed divider Fixed swipeMenu<commit_after>package com.omega_r.omegarecyclerview.pagination_example;

import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.Toast;

import com.omega_r.libs.omegarecyclerview.OmegaRecyclerView;
import com.omega_r.libs.omegarecyclerview.pagination.PaginationViewCreator;
import com.omega_r.omegarecyclerview.R;

import java.util.ArrayList;
import java.util.List;

public class ImageAdapter extends OmegaRecyclerView.Adapter<ImageAdapter.ViewHolder> implements PaginationViewCreator {

    private List<Image> mList = new ArrayList<>();
    @Nullable
    private Callback mCallback;

    public ImageAdapter() {
        setHasStableIds(true);
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_image, parent, false));
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        holder.imageView.setImageResource(mList.get(position).getImageRes());
    }

    public void addValues(List<Image> list) {
        mList.addAll(list);
        notifyItemInserted(mList.size() - list.size());
    }

    @Override
    public boolean isDividerAllowedBelow(int position) {
        return super.isDividerAllowedBelow(position) && position % 2 == 0;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public int getItemCount() {
        return mList.size();
    }

    @Nullable
    @Override
    public View createPaginationView(ViewGroup parent, LayoutInflater inflater) {
        return inflater.inflate(R.layout.item_progress, parent, false);
    }

    @Nullable
    @Override
    public View createPaginationErrorView(ViewGroup parent, LayoutInflater inflater) {
        View view = inflater.inflate(R.layout.item_error_loading, parent, false);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mCallback != null) {
                    mCallback.onRetryClicked();
                }
{'fraction_non_alphanumeric': 0.091324200913242, 'fraction_numerical': 0.00045662100456621003, 'mean_word_length': 3.443204868154158, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3440439', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1226, 'n_words': 251}