FileDocCategorySizeDatePackage
VisibilityCallback.javaAPI DocAndroid 5.1 API3429Thu Mar 12 22:22:12 GMT 2015android.view

VisibilityCallback

public class VisibilityCallback extends android.app.Activity
Exercise View's ability to change their visibility: GONE, INVISIBLE and VISIBLE.

Fields Summary
private static final boolean
DEBUG
private MonitoredTextView
mVictim
View.OnClickListener
mVisibleListener
View.OnClickListener
mInvisibleListener
View.OnClickListener
mGoneListener
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle icicle)

    
    
        
        super.onCreate(icicle);
        setContentView(R.layout.visibility_callback);

        // Find the view whose visibility will change
        mVictim = (MonitoredTextView)findViewById(R.id.victim);

        // Find our buttons
        Button visibleButton = (Button) findViewById(R.id.vis);
        Button invisibleButton = (Button) findViewById(R.id.invis);
        Button goneButton = (Button) findViewById(R.id.gone);

        // Wire each button to a click listener
        visibleButton.setOnClickListener(mVisibleListener);
        invisibleButton.setOnClickListener(mInvisibleListener);
        goneButton.setOnClickListener(mGoneListener);