Open houyuehai opened 5 years ago
and if return null,do not draw item
It merged but still only can be use for String, can not override
SimpleSpinnerTextFormatter textFormatter = new SimpleSpinnerTextFormatter() {
@Override
public Spannable format(Object item) {
Person person = (Person) item;
return new SpannableString(person.getName() + " " + person.getSurname());
}
};
Still force me to Override
@Override
public Spannable format(String text) {
return super.format(text);
}
This should be possible now: aa42151f2578598a3bde8cf94c88eeea62f5c30d.
Good library,Thinks. my data may not be String, it may be a student object, I want to show the name of the Student, but when I choose, I want to get the ID of the student from the listener. Because name is what the user sees, and ID is what the server needs. Maybe Spinner Text Formatter can be upgraded.
public interface SpinnerTextFormatter < T > { Spannable format(T var1); }