Skip to content

Instantly share code, notes, and snippets.

View miroslavign's full-sized avatar

Miroslav Ignjatovic miroslavign

View GitHub Profile
@miroslavign
miroslavign / RoundedQuickContactBadge
Created January 20, 2016 09:55 — forked from kishu27/RoundedQuickContactBadge
Just a quick and dirty method to get a rounded QuickContactBadge
/**
* A rounded version of {@link QuickContactBadge]
* @author kishu27 (http://linkd.in/1laN852)
*
*/
public class RoundedQuickContactBadge extends QuickContactBadge {
/**
* This path is used to mask out the outer edges of a circle on this View
*/
@miroslavign
miroslavign / EndlessRecyclerOnScrollListener.java
Created January 16, 2016 18:01 — forked from ssinss/EndlessRecyclerOnScrollListener.java
Endless RecyclerView OnScrollListener
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName();
private int previousTotal = 0; // The total number of items in the dataset after the last load
private boolean loading = true; // True if we are still waiting for the last set of data to load.
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more.
int firstVisibleItem, visibleItemCount, totalItemCount;