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

ColoredRectsActivity

public class ColoredRectsActivity extends android.app.Activity

Fields Summary
private android.animation.ObjectAnimator
mAnimator
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);
        getWindow().setBackgroundDrawable(new ColorDrawable(0xff000000));
        FrameLayout frame = new FrameLayout(this);
        final RectsView gpuView = new RectsView(this, 0, Color.GREEN);
        frame.addView(gpuView);
        final RectsView swView = new RectsView(this, 400, Color.RED);
        swView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
        frame.addView(swView);
        final RectsView hwBothView = new RectsView(this, 850, Color.GREEN);
        // Don't actually need to render to a hw layer, but it's a good sanity-check that
        // we're rendering to/from layers correctly
        hwBothView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
        frame.addView(hwBothView);
        final RectsView swBothView = new RectsView(this, 854, Color.RED);
        swBothView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
        frame.addView(swBothView);
        setContentView(frame);
    
protected voidonDestroy()

        super.onDestroy();