Search in sources :

Example 1 with ImageFlipRenderThread

use of com.android.test.uibench.opengl.ImageFlipRenderThread in project platform_frameworks_base by android.

the class GlTextureViewActivity method onSurfaceTextureAvailable.

@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
    mRenderThread = new ImageFlipRenderThread(getResources(), surface);
    mRenderThread.start();
    mTextureView.setCameraDistance(5000);
    ObjectAnimator animator = ObjectAnimator.ofFloat(mTextureView, "rotationY", 0.0f, 360.0f);
    animator.setRepeatMode(ObjectAnimator.REVERSE);
    animator.setRepeatCount(ObjectAnimator.INFINITE);
    animator.setDuration(4000);
    animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {

        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            mTextureView.invalidate();
        }
    });
    animator.start();
}
Also used : ImageFlipRenderThread(com.android.test.uibench.opengl.ImageFlipRenderThread) ObjectAnimator(android.animation.ObjectAnimator) ValueAnimator(android.animation.ValueAnimator)

Example 2 with ImageFlipRenderThread

use of com.android.test.uibench.opengl.ImageFlipRenderThread in project android_frameworks_base by ResurrectionRemix.

the class GlTextureViewActivity method onSurfaceTextureAvailable.

@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
    mRenderThread = new ImageFlipRenderThread(getResources(), surface);
    mRenderThread.start();
    mTextureView.setCameraDistance(5000);
    ObjectAnimator animator = ObjectAnimator.ofFloat(mTextureView, "rotationY", 0.0f, 360.0f);
    animator.setRepeatMode(ObjectAnimator.REVERSE);
    animator.setRepeatCount(ObjectAnimator.INFINITE);
    animator.setDuration(4000);
    animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {

        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            mTextureView.invalidate();
        }
    });
    animator.start();
}
Also used : ImageFlipRenderThread(com.android.test.uibench.opengl.ImageFlipRenderThread) ObjectAnimator(android.animation.ObjectAnimator) ValueAnimator(android.animation.ValueAnimator)

Example 3 with ImageFlipRenderThread

use of com.android.test.uibench.opengl.ImageFlipRenderThread in project android_frameworks_base by DirtyUnicorns.

the class GlTextureViewActivity method onSurfaceTextureAvailable.

@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
    mRenderThread = new ImageFlipRenderThread(getResources(), surface);
    mRenderThread.start();
    mTextureView.setCameraDistance(5000);
    ObjectAnimator animator = ObjectAnimator.ofFloat(mTextureView, "rotationY", 0.0f, 360.0f);
    animator.setRepeatMode(ObjectAnimator.REVERSE);
    animator.setRepeatCount(ObjectAnimator.INFINITE);
    animator.setDuration(4000);
    animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {

        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            mTextureView.invalidate();
        }
    });
    animator.start();
}
Also used : ImageFlipRenderThread(com.android.test.uibench.opengl.ImageFlipRenderThread) ObjectAnimator(android.animation.ObjectAnimator) ValueAnimator(android.animation.ValueAnimator)

Example 4 with ImageFlipRenderThread

use of com.android.test.uibench.opengl.ImageFlipRenderThread in project android_frameworks_base by crdroidandroid.

the class GlTextureViewActivity method onSurfaceTextureAvailable.

@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
    mRenderThread = new ImageFlipRenderThread(getResources(), surface);
    mRenderThread.start();
    mTextureView.setCameraDistance(5000);
    ObjectAnimator animator = ObjectAnimator.ofFloat(mTextureView, "rotationY", 0.0f, 360.0f);
    animator.setRepeatMode(ObjectAnimator.REVERSE);
    animator.setRepeatCount(ObjectAnimator.INFINITE);
    animator.setDuration(4000);
    animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {

        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            mTextureView.invalidate();
        }
    });
    animator.start();
}
Also used : ImageFlipRenderThread(com.android.test.uibench.opengl.ImageFlipRenderThread) ObjectAnimator(android.animation.ObjectAnimator) ValueAnimator(android.animation.ValueAnimator)

Aggregations

ObjectAnimator (android.animation.ObjectAnimator)4 ValueAnimator (android.animation.ValueAnimator)4 ImageFlipRenderThread (com.android.test.uibench.opengl.ImageFlipRenderThread)4