Can't understand which class I should set as arguement in the constructor of ParseQueryAdapter class

106 views Asked by At

I am new to android and Parse.com .I am following this link. I am trying to get rid of an exception which is,

java.lang.IllegalArgumentException: Spinner adapter view type count must be 1.

so I am extending the my adapter class to ParseQueryAdapter. here is my adapter class.

import android.content.Context;
import com.parse.ParseQueryAdapter;
import com.parse.ParseUser;

public class adapter extends ParseQueryAdapter<ParseUser> {

public adapter(Context context, Class clazz) {
    super(context, clazz);
}


@Override
public int getViewTypeCount() {
    return 1;
}

}

from my activity I am calling

adapter parsequeryadapter = new adapter(this,/*WHICH CLASS I SHOULD PUT HERE*/);

I cant understand which class I should put in the second parameter. I have seen the ParseQueryAdapter class. the second parameter takes a class and that class has to be extended to ParseObject. here is the developers constructor of ParseQueryAdapter :

public ParseQueryAdapter(android.content.Context context, java.lang.Class<? extends com.parse.ParseObject> clazz) { /* compiled code */ }

I dont have any class which extends ParseObject or ParseUser. I have set the ParseUser from another activity which extends action bar activity. What can I do now? Please help.

0

There are 0 answers