FileDocCategorySizeDatePackage
Animated3dActivity.javaAPI DocAndroid 5.1 API1793Thu Mar 12 22:22:44 GMT 2015com.android.test.hwui

Animated3dActivity

public class Animated3dActivity extends android.app.Activity

Fields Summary
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);

        ImageView view = new ImageView(this);
        view.setImageResource(R.drawable.large_photo);

        setContentView(view, new FrameLayout.LayoutParams(
                FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT
        ));

        ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotationY", 0.0f, 360.0f);
        animator.setDuration(4000);
        animator.setRepeatCount(ObjectAnimator.INFINITE);
        animator.setRepeatMode(ObjectAnimator.REVERSE);
        animator.start();