1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

Accessing selected item from Spinner present in custom defined List


Last Updated:

  1. DevAtAndroid

    DevAtAndroid New Member This Topic's Starter

    Joined:
    Sep 3, 2010
    Messages:
    1
    Likes Received:
    0
    Hi All,
    I have created one custom defined list where the each list item is having 2 images, 2 viewtext, one spinner and one edittext. I am able to manipulate every control inside list item. I am also able to get value of echs control except spinner. When I am trying to get the selected item at a paricular position, it is returning "0" every time. Where as I acn get the value of entered text in the edittext view. Why is it happening like this. Can any body help me in this regard?

    In spinner I am providing value like this
    ArrayAdapter<String> adapter = ​
    new ArrayAdapter<String>(this.getContext(),
    android.R.layout.
    simple_spinner_item, OSA_TYPE);
    adapter.setDropDownViewResource(android.R.layout.
    simple_spinner_dropdown_item);

    spinner.setAdapter(adapter);

    Can any body tell how to get the values selected in spinner?
     

    Advertisement

Share This Page

Loading...