I want to check first if spinner has null values based on the following:
String Name= spinnerName.getSelectedItem().toString();
if(Name != null) {
} els
Function for Spinner
Item Selection
SpinnerName.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView> adapter, View v,int position, long id) {
// On selecting a spinner item
selected_item = adapter.getItemAtPosition(position).toString();
}
@Override
public void onNothingSelected(AdapterView> arg0) {
}
});
Check condition for selected Item
if(selected_item.matches("")){
//conditions accordingly
return;
}