FileDocCategorySizeDatePackage
TranslucentFancyActivity.javaAPI DocAndroid 1.5 API2341Wed May 06 22:42:02 BST 2009com.android.frameworktest.activity

TranslucentFancyActivity

public class TranslucentFancyActivity extends android.app.Activity

Fancy Translucent Activity

This demonstrates the how to write an activity that is translucent, allowing windows underneath to show through, with a fancy compositing effect.

Demo

App/Activity/Translucent Fancy

Source files

src/com/android/samples/app/TranslucentFancyActivity.java The Translucent Fancy Screen implementation
/res/any/layout/translucent_background.xml Defines contents of the screen

Fields Summary
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle icicle)
Initialization of the Activity after it is first created. Must at least call {@link android.app.Activity#setContentView setContentView()} to describe what is to be displayed in the screen.

        // Be sure to call the super class.
        super.onCreate(icicle);

        // Have the system blur any windows behind this one.
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
                WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
        
        // See assets/res/any/layout/translucent_background.xml for this
        // view layout definition, which is being set here as
        // the content of our screen.
        setContentView(R.layout.translucent_background);