In my Android application, I want to set the ArrayList<User> to the spinner. I don't know how to set the above list to spinner. Please tell me how to do.
Below is the User bean class.
class User {
String userId;
String userName;
String userCountry;
public String getuserId() {
return CountryId;
}
public void setuserId(String userId) {
userId = userId;
}
public String getuserName() {
return userName;
}
public void setuserName(String userName) {
userName = userName;
}
public String getuserCountry() {
return userCountry;
}
public void setuserCountry(String userCountry) {
userCountry = userCountry;
}
@Override
public String toString() {
// TODO Auto-generated method stub
return userName;
}
}