FileDocCategorySizeDatePackage
Controls2.javaAPI DocGoogle Android v1.5 Example1722Sun Nov 11 13:01:04 GMT 2007com.google.android.samples.view

Controls2

public class Controls2 extends android.app.Activity
A gallery of basic controls: Button, EditText, RadioButton, Checkbox, Spinner. This example uses the dark theme.

Fields Summary
private static final String[]
mStrings
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);
        setTheme(android.R.style.Theme_Dark);
        setContentView(R.layout.controls_1);

        Spinner s1 = (Spinner) findViewById(R.id.spinner1);
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_spinner_item, mStrings);
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        s1.setAdapter(adapter);