Code example for ScaleGestureDetector

0
    private int mActivePointerId = INVALID_POINTER_ID;
 
    public FBOSyncView(Context context) {
        super(context);
        ensureRenderScript(); 
        mScaleDetector = new ScaleGestureDetector(context, new ScaleListener());
    } 
 
    private void ensureRenderScript() { 
        if (mRS == null) {
            RenderScriptGL.SurfaceConfig sc = new RenderScriptGL.SurfaceConfig();
            sc.setDepth(16, 24);
            mRS = createRenderScriptGL(sc);
            mRender = new FBOSyncRS();
            mRender.init(mRS, getResources());
        } 
    } 
 
    @Override 
    protected void onAttachedToWindow() { 
        super.onAttachedToWindow();