FileDocCategorySizeDatePackage
PopupWindowVisibility.javaAPI DocAndroid 1.5 API6201Wed May 06 22:42:02 BST 2009com.android.frameworktest.view

PopupWindowVisibility

public class PopupWindowVisibility extends android.app.Activity implements android.view.View.OnClickListener
Tests views with popupWindows becoming invisible

Fields Summary
private android.view.View
mFrame
private android.widget.Button
mHide
private android.widget.Button
mShow
private static final String[]
mStrings
static final String[]
COUNTRIES
Constructors Summary
Methods Summary
public voidonClick(android.view.View v)

        mFrame.setVisibility(v == mHide ? View.INVISIBLE : View.VISIBLE);
    
protected voidonCreate(android.os.Bundle icicle)

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

        mFrame = findViewById(R.id.frame);
        
        mHide = (Button) findViewById(R.id.hide);
        mHide.setOnClickListener(this);
        
        mShow = (Button) findViewById(R.id.show);
        mShow.setOnClickListener(this);
        
        Spinner spinner = (Spinner) findViewById(R.id.spinner);
        ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_spinner_item, mStrings);
        spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinner.setAdapter(spinnerAdapter);
        
        ArrayAdapter<String> autoAdapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_dropdown_item_1line, COUNTRIES);
        AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.auto);
        textView.setAdapter(autoAdapter);