Tag Archives: setOnItemSelectedListener

10,159 views

Spinner ComboBox DropDown set on selected item listener setOnItemSelectedListener Java Android example

Spinner, ArrayAdapter, setOnItemSelectedListener, onItemSelected, setDropDownViewResource MainClass.java public class Vypocet extends Activity { Spinner hSpinnerMetry; // ……. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);   hSpinnerMetry = (Spinner) findViewById(R.id.idSpinnerMetry); ArrayAdapter<CharSequence> adapterMetry = ArrayAdapter.createFromResource( this, R.array.metry_array, android.R.layout.simple_spinner_item); adapterMetry.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); hSpinnerMetry.setAdapter(adapterMetry);   hSpinnerMetry.setOnItemSelectedListener( new … Continue reading

Posted in Android Examples Code | Tagged , , , , , , | Comments Off on Spinner ComboBox DropDown set on selected item listener setOnItemSelectedListener Java Android example