TranslucentFancyActivity.javaAPI DocGoogle Android v1.5 Example2803Sun Nov 11 13:01:04 GMT


public class TranslucentFancyActivity extends

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.


App/Activity/Translucent Fancy

Source files

src/com/google/android/samples/app/ 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 setContentView()} to describe what is to be displayed in the screen.

        // Be sure to call the super class.

        // Have the system blur any windows behind this one.
        // Apply a tint to any windows behind this one.  Doing a tint this
        // way is more efficient than using a translucent background.  Note
        // that the tint color really should come from a resource.
        WindowManager.LayoutParams lp = getWindow().getAttributes();
        lp.tintBehind = 0x60000820;
        // See assets/res/any/layout/translucent_background.xml for this
        // view layout definition, which is being set here as
        // the content of our screen.