Skip to content

Instantly share code, notes, and snippets.


Angad Singh Angads25

Block or report user

Report or block Angads25

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Angads25 / Dockerfile
Last active Apr 11, 2019
Docker file for Android Tests
View Dockerfile
FROM openjdk:8-jdk
MAINTAINER Angad Singh <>
CMD ["gradle"]
ENV GRADLE_HOME /opt/gradle
ARG GRADLE_DOWNLOAD_SHA256=b018a7308cb43633662363d100c14a3c41c66fd4e32b59e1dfc644d6fd2109f6
RUN set -o errexit -o nounset \
Angads25 /
Created Jan 16, 2019
RecyclerView Touch Helper
import android.view.View;
public interface OnItemClickListener {
void onClick(RecyclerView parent, View v, int position);
Angads25 /
Last active Jan 22, 2019
Utility functions used regularly
public class Utility {
public static void copyDatabaseToSdcard(Context context, String databaseName) {
if(BuildConfig.DEBUG) {
String currentDBPath = context.getDatabasePath(databaseName).getAbsolutePath();
String downloadDir = Environment.getExternalStorageDirectory() + "/Dump/" + databaseName + ".db";
File dataBase = new File(currentDBPath);
File file = new File(downloadDir);
try {
Angads25 /
Created Oct 4, 2018
An array list that keeps items sorted and unique
import com.github.angads25.javaplayground.model.UniqueListItem;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Collection;
public class SortedUniqueList<T extends UniqueListItem> extends AbstractList<T> {
private ArrayList<T> internalList = new ArrayList<>();
@Override public boolean add(T t) {
You can’t perform that action at this time.