
Originally Posted by
boilermaker
most of them make sense, the majority have to deal with onWindowFocusChanged. Is there a better/other way to code when a spinner selection has been made besides this?
The onWindowFocusChanged documentation says this:
onWindowFocusChanged(boolean) Called when the window containing the view gains or loses focus.
I expect you have a listener to handle views gaining focus, but not the window losing focus? (for example when the menu appears, the menu will have focus)

Originally Posted by
ickyfehmleh
The Spinner class supports a View.OnClickListener being set, have you tried that?
This is correct, if you want to listen to events on something then find the smallest listener that covers only that thing's events.
Something like this:
Code:
Spinner s = new Spinner(this);
s.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
// do something
});
(Note define the spinner in xml, don't be naughty like me)
Whenever the spinner is clicked you will get the onClick method getting called, and v contains the view object that called it 
Eg:
Log.d("spinner1",((Spinner)v).getSelectedItem().to String()); (not too useful but I don't know what class your data is.)
Bookmarks