FileDocCategorySizeDatePackage
OverlayTest.javaAPI DocAndroid 5.1 API1798Thu Mar 12 22:22:44 GMT 2015com.android.transitiontests

OverlayTest

public class OverlayTest extends android.app.Activity

Fields Summary
android.view.ViewGroup
mContainer
android.view.ViewGroup
mRoot
Constructors Summary
Methods Summary
public voidonClick(android.view.View view)

        final Button fadingButton = (Button) findViewById(R.id.fadingButton);
        if (fadingButton != null) {
            mContainer.removeView(fadingButton);
            mRoot.getOverlay().add(fadingButton);
            fadingButton.animate().alpha(0).setDuration(1000).withEndAction(new Runnable() {
                @Override
                public void run() {
                    fadingButton.setAlpha(1);
                    mRoot.getOverlay().remove(fadingButton);
                    mContainer.addView(fadingButton);
                }
            });
        }
    
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);
        setContentView(R.layout.overlay_test);

        mContainer = (ViewGroup) findViewById(R.id.container);
        mRoot = (ViewGroup) mContainer.getParent();