我将微调器与对象绑定,但微调器填充了错误的值,例如 (com.adroit.test1.test@444..)
我的代码有什么问题,任何帮助将不胜感激
JSONArray jsonarrayCountry=JSONFunction.getJSONCountry();
JSONObject jsonCountry=null;
String[] arrayCounrty = new String[jsonarrayCountry.length()];
//ArrayList<String> arrayCategary;
try {
for(int i=0;i< jsonarrayCountry.length();i++)
{
jsonCountry=jsonarrayCountry.getJSONObject(i);
arrayCounrty[i]=jsonCountry.getString("Name");
eexit item=new eexit();
item.setName(jsonCountry.getString("Name"));
item.setId(Integer.parseInt(jsonCountry.getString("CountryID")));
listCountry.add(item);
System.out.println("arrayCounrty::"+arrayCounrty[i]);
}
} catch (Exception e) {
// TODO: handle exception
}
ArrayAdapter<eexit> selcountryadapter = new ArrayAdapter<eexit>(this, android.R.layout.simple_spinner_item, listCountry);
selCountry.setAdapter(selcountryadapter);