Skip to content

Instantly share code, notes, and snippets.

View niusounds's full-sized avatar
🤘

Yuya Matsuo niusounds

🤘
View GitHub Profile
@niusounds
niusounds / LayerImageView.java
Last active December 31, 2015 00:09
レイヤーごとのBitmapを保持して重ねて描画するViewのサンプル
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffXfermode;
@niusounds
niusounds / RotateGestureDetector.java
Last active December 29, 2015 15:09
Simple RotateGestureDetector can be used in the same way as GestureDetector and ScaleGestureDetector.
import android.content.Context;
import android.view.MotionEvent;
public class RotateGestureDetector {
public static interface OnRotateListener {
boolean onRotate(float degrees, float focusX, float focusY);
}
public static class SimpleOnRotateGestureDetector implements OnRotateListener {
@Override