-1
这是我的代码:错误填充微调使用数据库值
设置内容的浏览声明:
GetDataAdapter1 = new ArrayList<>();
// spinner item select listener
spinnerCountry.setOnItemSelectedListener(this);
这是i'm使用JSON请求我的分析值。
public void JSON_PARSE_DATA_AFTER_WEBCALL(JSONArray array) {
for (int i = 0; i < array.length(); i++) {
Country GetDataAdapter2 = new Country();
JSONObject json = null;
try {
json = array.getJSONObject(i);
GetDataAdapter2.setName(json.getString("country_name"));
GetDataAdapter2.setId(json.getString("id"));
} catch (JSONException e) {
e.printStackTrace();
}
GetDataAdapter1.add(GetDataAdapter2);
}
//Setting adapter to show the items in the spinner
spinnerCountry.setAdapter(new ArrayAdapter<String>(DataComplet.this, android.R.layout.simple_spinner_dropdown_item, GetDataAdapter1));
}
这是我得到的错误:
Cannot resolve constructor 'ArrayAdapter(com.futegolo.jobnow.DataComplet, int, java.util.List<com.futegolo.jobnow.Configs.Country>)'