package org.example.mbtiapplication;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widge
Another thing: When you have more than one spinner in your layout, you have to implement a switch selection in the onItemSlected() method to know which widget was clicked. Something like this:
@Override
public void onItemSelected(AdapterView> parent, View view, int position, long id) {
switch (parent.getId()){
case R.id.sp_alarmSelection:
//Do something
Toast.makeText(this, "Alarm Selected: " + parent.getSelectedItem().toString(), Toast.LENGTH_SHORT).show();
break;
case R.id.sp_optionSelection:
//Do another thing
Toast.makeText(this, "Option Selected: " + parent.getSelectedItem().toString(), Toast.LENGTH_SHORT).show();
break;
}
}