Skip to content

Instantly share code, notes, and snippets.

View RahulJanagouda's full-sized avatar
🚧

Rahul Janagouda RahulJanagouda

🚧
View GitHub Profile
@RahulJanagouda
RahulJanagouda / IgnoreCaseTextMatcher.java
Created September 24, 2017 18:58 — forked from tir38/IgnoreCaseTextMatcher.java
Espresso (Hamcrest) matcher to match TextView text but ignoreCase
package com.example.app;
import android.support.test.espresso.matcher.BoundedMatcher;
import android.view.View;
import android.widget.TextView;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import static com.google.common.base.Preconditions.checkNotNull;
@RahulJanagouda
RahulJanagouda / reactiveconf-2017-async-in-redux-cfp.md
Created August 22, 2017 14:21 — forked from kakadiadarpan/reactiveconf-2017-async-in-redux-cfp.md
Different approaches to handling asynchronous Redux actions.

Async in Redux

This is a CFP for ReactiveConf open call for lightning talks. If you'd like to see this talk become a reality, please ⭐️ star this gist. #ReactiveConf

If you're on your phone, please request the desktop site to star this gist 😇

/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@RahulJanagouda
RahulJanagouda / convert-to-webp.sh
Created August 3, 2016 02:46 — forked from SandroMachado/convert-to-webp.sh
Script to convert all the `JPEG` images to the `WEBP` format in your Android project
#/bin/sh
# Inpiration: http://engineeringblog.yelp.com/2016/05/yelp-android-app-went-on-a-diet.html
# `-lossless` not used to give support for Android 4.0+
# Make sure cwebp is installed.
if ! type "cwebp" > /dev/null; then
echo "Please install cwebp to continue:"
echo "brew install webp"
exit 1
fi
public class CircularProgressDrawable extends Drawable
implements Animatable {
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator();
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator();
private static final int ANGLE_ANIMATOR_DURATION = 2000;
private static final int SWEEP_ANIMATOR_DURATION = 600;
private static final int MIN_SWEEP_ANGLE = 30;
private final RectF fBounds = new RectF();
@RahulJanagouda
RahulJanagouda / GsonRequest.java
Created February 19, 2016 19:50 — forked from ficusk/GsonRequest.java
A Volley adapter for JSON requests that will be parsed into Java objects by Gson.
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
@RahulJanagouda
RahulJanagouda / gist:ad5e2bfeb18d468f9886
Created October 12, 2015 07:22
Example script for demo mode (for screenshotting purposes)
#!/bin/sh
CMD=$1
if [[ $ADB == "" ]]; then
ADB=adb
fi
if [[ $CMD != "on" && $CMD != "off" ]]; then
echo "Usage: $0 [on|off] [hhmm]" >&2
exit
https://github.com/googlesamples
@RahulJanagouda
RahulJanagouda / colors.xml
Created November 22, 2014 05:42
Material Colors
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#000000</color>
<color name="white">#FFFFFF</color>
<color name="red_50">#FFEBEE</color>
<color name="red_100">#FFCDD2</color>
<color name="red_200">#EF9A9A</color>
<color name="red_300">#E57373</color>