FileDocCategorySizeDatePackage
Visibility.javaAPI DocAndroid 5.1 API2193Thu Mar 12 22:22:12 GMT 2015android.view

Visibility

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

Fields Summary
View.OnClickListener
mVisibleListener
View.OnClickListener
mInvisibleListener
View.OnClickListener
mGoneListener
private android.view.View
mVictim
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle icicle)

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

        // Find the view whose visibility will change
        mVictim = 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);