Skip to content

Instantly share code, notes, and snippets.

View gandharva's full-sized avatar
🧑‍💻
building measure.sh

gandharva kumar gandharva

🧑‍💻
building measure.sh
View GitHub Profile
@derekbrameyer
derekbrameyer / CircularProgressView.java
Created May 7, 2014 18:57
CircularProgressView.java
package com.doomonafireball.samples.android.widget;
import com.doomonafireball.samples.android.R;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
@copolii
copolii / so21641022
Last active August 29, 2015 13:56
StackOverflow Question 21641022: How do I parse class hierarchies with gson?Link: http://stackoverflow.com/questions/21641022
package com.copolii.example.so21641022.model.util;
import com.copolii.example.so21641022.model.a.TypeA_A;
import com.copolii.example.so21641022.model.a.TypeA_B;
import com.copolii.example.so21641022.model.b.TypeB_A;
import com.copolii.example.so21641022.model.b.TypeB_B;
import com.copolii.example.so21641022.model.base.AbstractSuperType;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import junit.framework.TestCase;
case 0:
//Close Drawer
mDrawerList.setItemChecked(position, true);
setTitle(mStringTitles[position]);
mDrawerLayout.closeDrawer(mDrawerView);
//Wait 270 milliseconds for change fragment view
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
@guohai
guohai / ArcTranslateAnimation.java
Created April 3, 2012 16:55
Curved Path Animation in Android
import android.graphics.PointF;
import android.view.animation.Animation;
import android.view.animation.Transformation;
// http://www.math.ubc.ca/~cass/gfx/bezier.html
public class ArcTranslateAnimation extends Animation {
private int mFromXType = ABSOLUTE;
private int mToXType = ABSOLUTE;