FileDocCategorySizeDatePackage
MutateDrawable.javaAPI DocAndroid 1.5 API1581Wed May 06 22:42:02 BST 2009com.android.frameworktest.drawable

MutateDrawable

public class MutateDrawable extends android.app.Activity

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

        super.onCreate(savedInstanceState);

        LinearLayout layout = new LinearLayout(this);

        Button ok = new Button(this);
        ok.setId(R.id.a);
        ok.setBackgroundDrawable(getResources().getDrawable(
                R.drawable.sym_now_playing_skip_forward_1));

        Button cancel = new Button(this);
        cancel.setId(R.id.b);
        cancel.setBackgroundDrawable(getResources().getDrawable(
                R.drawable.sym_now_playing_skip_forward_1));

        layout.addView(ok);
        layout.addView(cancel);

        ok.getBackground().mutate().setAlpha(127);

        setContentView(layout);