Пожалуйста, попробуйте один с этим.
String[] weeks = {"Sunday", "Monday", "Tuesday", "Wednesday", "thursday"};
Spinner spinner = (Spinner) findViewById(R.id.spinnerMethodInterviews);
Spinner spinnerSecond = (Spinner) findViewById(R.id.spinnerMethodSecond);
ArrayAdapter<String> spinnerAdapter = new ArrayAdapter(this,
R.layout.custom_title, android.R.id.text1, weeks);
spinnerAdapter.setDropDownViewResource(R.layout.cutom_spinner);
spinner.setAdapter(spinnerAdapter);
spinnerSecond.setAdapter(spinnerAdapter);
spinner.setOnItemSelectedListener(this);
spinnerSecond.setOnItemSelectedListener(this);
and when on click of item check id and get items
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
int id = adapterView.getId();
switch (id)
{
case R.id.spinnerMethodInterviews:
Log.e("spinnerFirst",adapterView.getItemAtPosition(i).toString());
break;
case R.id.spinnerMethodSecond:
Log.e("spinnerSecond",adapterView.getItemAtPosition(i).toString());
break;
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}