Is it possible to know whether a Spinner
is open or closed? It would even be better if there was some sort of onOpenListener for Spinners.
I've tried using an OnItemSelectedListener like this:
spinnerType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
executeSomething();
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
Log.d("nothing" , "selected");
}
});
I can know that the window will close if something is selected (in executeSomething()). But I don't get notified if I click outside of the Dialog, which also closes the spinner
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…