Skip to content

Instantly share code, notes, and snippets.

View TheReprator's full-sized avatar
🎯
Focusing

Vikram Singh TheReprator

🎯
Focusing
View GitHub Profile
package mp.wallypark.utility.itemDecorators;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.support.annotation.ColorRes;
import android.support.annotation.DimenRes;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
@TheReprator
TheReprator / ClickToSelectEditText.java
Created May 1, 2017 20:11 — forked from rodrigohenriques/ClickToSelectEditText.java
Used to make your EditText a better option than Spinners
public class ClickToSelectEditText<T extends Listable> extends AppCompactEditText {
List<T> mItems;
String[] mListableItems;
CharSequence mHint;
OnItemSelectedListener<T> onItemSelectedListener;
public ClickToSelectEditText(Context context) {
super(context);
@TheReprator
TheReprator / GenericAsyncTaskLoader.java
Created April 27, 2017 19:31 — forked from HenokT/GenericAsyncTaskLoader.java
An example of a Generic AsyncTaskLoader for Android
package com.yourcompany.util;
import android.content.Context;
import android.support.v4.content.AsyncTaskLoader;
import android.util.Log;
import com.yourcompany.util.GenericAsyncTaskLoader.ServiceData;
/**
* A generic Loader that delegates its actual loading operation to a
* CustomLoaderCallbacks<T> instance passed through the constructor.
@TheReprator
TheReprator / SimpleCursorLoader.java
Created April 27, 2017 19:04 — forked from cbeyls/SimpleCursorLoader.java
A CursorLoader to implement simple monitorable database queries without a ContentProvider.
package be.digitalia.fosdem.loaders;
import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.AsyncTaskLoader;
/**
* A CursorLoader that doesn't need a ContentProvider.
*
* @author Christophe Beyls
@TheReprator
TheReprator / CircleArcProgress
Last active July 28, 2017 02:31
Double Arc progressbar with text inside
package com.singh.daman.proprogressviews;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Typeface;
@TheReprator
TheReprator / PaddingItemDecoration.java
Created March 14, 2017 09:06 — forked from BenDLH/PaddingItemDecoration.java
Item decoration to add padding vertically and horizontally to RecyclerViews using Linear and Grid layout managers.
//
// Created by Ben on 28/09/2016.
// Copyright (c) 2016 SHAPE A/S. All rights reserved.
//
public class PaddingItemDecoration extends RecyclerView.ItemDecoration {
private final Context _context;
private Resources _resources;
private Paint _paint = new Paint(Paint.ANTI_ALIAS_FLAG);
import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
@TheReprator
TheReprator / PatternedEditText
Created January 8, 2016 12:23
Patterened edit text for any pattern in android
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcelable;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.EditText;