Getting values from the spinner inside the list
I've create the android application program using list adapter that extends the list act开发者_StackOverflow社区ivity....Inside the list i am having the spinner.. how can i get the value from the spinner inside the list..tell some idea.Thanks in Advance..
try this ::
@Override
public void onItemSelected(AdapterView<?> parent, View view,
int position, long id) {
String str = mSpinner.getSelectedItem().toString();
// getting item id by this
myId = parent.getItemAtPosition(position).toString();
}
I am assuming you only have one spinner in the list. In that case you can get the view by id of that spinner and fetch the value. If there are more than one then you need to add different tags to them while adding them to the list (in ListAdpater) and get these views from tag and get the value.
精彩评论