i have two spinners, city and neighborhood, when i select a city it populates neighborhoods list. but i want when i click neighborhood spinner and city is empty to show a message or an Alertdialog. i tried to use ontouchevent on the second spinner but it doesn't work. i m using custom spinner com.toptoche.searchablespinnerlibrary.SearchableSpinner thanks for help
neighborhoodSpinner.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP) {
Toast.makeText(getApplicationContext(),"city emty",Toast.LENGTH_LONG).show();
}
return false;
}
});