Code example for TextureView

Methods: invalidate

0
        animator.setRepeatCount(ObjectAnimator.INFINITE);
        animator.setDuration(4000);
        animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override 
            public void onAnimationUpdate(ValueAnimator animation) {
                mTextureView.invalidate();
            } 
        }); 
        animator.start();
    } 
 
    @Override 
    public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
    } 
 
    @Override 
    public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
        mRenderThread.finish();
        try { 
            mRenderThread.join();
        } catch (InterruptedException e) {