i m a beginner for Android development....

  How i get the Selected item from the list Adapter.

  for example i m having the code:



  Code:

 final Spinner spinner = (Spinner) findViewById(R.id.testSpinner);
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
    android.R.layout.simple_spinner_item, Months);

adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(adapter);



       /-----------some code--------/

  static final String[] Months = new String[]{
    "January","February","March","April","May","June","July","August",
    "September","October","November","December"
    };



  public void changeOption(Spinner spinner){
    if (spinner.isEnabled()){
    spinner.setEnabled(false);



    }
    else{
    spinner.setEnabled(true);
    }
    }


Question:

In this above code if i selected March from the Dropdown Adapter means then
how can i retrieve the Manth March to show in a textview.

Please tell me the ANswer...


with Regard,
Raghav.S

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to