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

ViewLayersActivity5

public class ViewLayersActivity5 extends android.app.Activity

Fields Summary
private final android.graphics.Paint
mPaint
private static final String[]
DATA_LIST
Constructors Summary
Methods Summary
public voiddisableClip(android.view.View v)

        ((ClipFrameLayout) findViewById(R.id.container)).setClipEnabled(false);
    
public voiddisableLayer(android.view.View v)

        findViewById(R.id.container).setLayerType(View.LAYER_TYPE_NONE, null);
    
public voidenableClip(android.view.View v)

        ((ClipFrameLayout) findViewById(R.id.container)).setClipEnabled(true);
    
public voidenableLayer(android.view.View v)

        findViewById(R.id.container).setLayerType(View.LAYER_TYPE_HARDWARE, mPaint);
    
public voidgrowLayer(android.view.View v)

        findViewById(R.id.container).getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;
        findViewById(R.id.container).requestLayout();
    
private voidinit()

        mPaint.setColorFilter(new PorterDuffColorFilter(0xff00ff00, PorterDuff.Mode.MULTIPLY));
    
protected voidonCreate(android.os.Bundle savedInstanceState)


    
        
        super.onCreate(savedInstanceState);

        init();

        setContentView(R.layout.view_layers_5);
        setupList(R.id.list1);
    
private voidsetupList(int listId)

        final ListView list = (ListView) findViewById(listId);
        list.setAdapter(new SimpleListAdapter(this));
    
public voidshrinkLayer(android.view.View v)

        findViewById(R.id.container).getLayoutParams().height = 300;
        findViewById(R.id.container).requestLayout();