/**
* 根据传进来的对象反射出getPickerViewText()方法,来获取需要显示的值
* @param item
* @return
*/
* 根据传进来的对象反射出getPickerViewText()方法,来获取需要显示的值
* @param item
* @return
*/
private String getContentText(Object item) {
String contentText = item.toString();
try {
Class<?> clz = item.getClass();
Method m = clz.getMethod(GETPICKERVIEWTEXT);
contentText = m.invoke(item, new Object[0]).toString();
} catch (NoSuchMethodException e) {
} catch (InvocationTargetException e) {
} catch (IllegalAccessException e) {
} catch (Exception e){
}
return contentText;
}