-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>)'