Honest wrote: > I want to add String values in spinner at run time. My problem is that > the value is not available in res file. Can some one tell me how can i > do it ? I just want to insert one String array or simple String run > time in Spinner.
Step #1: Put your initial values in an ArrayList<String> Step #2: Wrap the ArrayList<String> in an ArrayAdapter<String> Step #3: Give the ArrayAdapter<String> to the spinner Step #4: When you want to modify the contents of the spinner, use the methods on ArrayAdapter to do so -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coders' Guide to *Advanced* Android Development_ In Print! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---