I am using Parse.com in my application when I use ParseQueryAdapter in fragment to retrieve data and pass to a spinner an error as
java.lang.IllegalArgumentException: Spinner adapter view type count must be 1
and application stops. However if I try ArrayAdapter it works. What could be the problem?
ParseQueryAdapter Code:
ParseQueryAdapter.QueryFactory<ParseObject> spnQuery=
new ParseQueryAdapter.QueryFactory<ParseObject>() {
public ParseQuery create() {
ParseQuery query = new ParseQuery(tableName);
return query;
}
};
ParseQueryAdapter<ParseObject> adapter = new ParseQueryAdapter<ParseObject>(getActivity().getApplicationContext(), spnQuery);
adapter.setTextKey(columnName);
spnLecture.setAdapter(adapter);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…