Skip to content

Instantly share code, notes, and snippets.

View kidfolk's full-sized avatar

Nick Xu kidfolk

View GitHub Profile
protected void onDraw(Canvas canvas){
super.onDraw(canvas);
// init shader
BitmapShader shader;
shader = new BitmapShader(originalBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
// init paint
Paint paint = new Paint();
paint.setAntiAlias(true);
@kidfolk
kidfolk / README.md
Created December 5, 2012 02:22 — forked from JakeWharton/README.md
Maven pom for Google Play services

Maven + Google Play Services

The recently released version of Google Play Services presents itself as a library project with string and attribute resources coupled with a .jar in the libs/ folder that has been compiled against internal APIs.

While this is convenient for users of IDEs or Ant, it presents a problem for those using proper build systems (e.g., Maven, Gradle) with dependency management. Inside the .jar there are a lot of classes which reference static attributes on the com.google.android.gsm.R class. This means that

public class Test {
static{
System.loadLibrary("test");
}
public native int getStringLen(String str);
private CallBack callBack;
public void setCallBack(CallBack callBack){
this.callBack = callBack;