Fix ArrayAdapter, which was fixed in cupcake_dcm and kept fixed until donut, but is broken in eclair.

Original internal Change: 147459-p9
This commit is contained in:
Daisuke Miyakawa
2009-07-09 14:26:56 +09:00
parent afefa49abc
commit b5d9132d4e

View File

@@ -348,7 +348,12 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable {
"ArrayAdapter requires the resource ID to be a TextView", e);
}
text.setText(getItem(position).toString());
T item = getItem(position);
if (item instanceof CharSequence) {
text.setText((CharSequence)item);
} else {
text.setText(item.toString());
}
return view;
}