You could create another array, like :
Arraylist <String> array2 = new ArrayList() ;
for (Country country : countries){
array2.add(country.getname())}
And then in your spinner you put array2 instead of countries.
Since you added them in the same order, their index will be the same than in your countries array, then if you want to get à country back, in your onselected item listener, for example, you just have to out sthg like
Country selectedcountry = countries.get(position);
This is how I did it for a list of contacts :
String [] contractList = new String[user.getUserContractsList().size()];
for (int i = 0; i < user.getUserContractsList().size(); i ++){
contractList[i] = user.getUserContractsList().get(i).getCONTRACT_NAME();
}
//Setting the spinner
ArrayAdapter adapter = new ArrayAdapter(getContext(), android.R.layout.simple_list_item_1, contractList);
spin.setAdapter(adapter);
spin.setOnItemSelectedListener(this);
And then to get back the contact value when the user selects an item :
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
contract = user.getUserContractsList().get(position);
}
I don't know if this is clear to you ?