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

Spinner1

public class Spinner1 extends android.app.Activity

Fields Summary
Constructors Summary
Methods Summary
public voidonCreate(android.os.Bundle icicle)

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

        Spinner s1 = (Spinner) findViewById(R.id.spinner1);
        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
                this, R.array.colors, android.R.layout.simple_spinner_item);
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        s1.setAdapter(adapter);

        Spinner s2 = (Spinner) findViewById(R.id.spinner2);
        adapter = ArrayAdapter.createFromResource(this, R.array.planets,
                android.R.layout.simple_spinner_item);
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        s2.setAdapter(adapter);