0

I've saved current user's friend list with PFRelation in android with parse and I want to query the current user's friend list to show it in listView (Or ListAdapter, I don't know which one is better)

Can you guys show me how to do it? source code provided will be great

let me know if you need any additional info!

Thank you

EDIT: I've tried this code but there's error occur says that

Error:(67, 25) error: name clash: done(List<ParseObject>,ParseException) in <anonymous com.example.krisanapongpoonsawat.chatit.User$1> and done(List<T>,ParseException) in FindCallback have the same erasure, yet neither overrides the other

where T is a type-variable: T extends ParseObject declared in interface FindCallback

private void loadUserList()
{
    ParseQuery query = new ParseQuery("Friends");
    query.whereEqualTo("owner", ParseUser.getCurrentUser().getObjectId().toString());
    query.findInBackground(new FindCallback() {
        public void done(List<ParseObject> friendList, ParseException e) {
            if (e == null) {
                Log.d("score", "Retrieved " + friendList.size() + " scores");
                for (int i = 0; i < friendlist.size(); i++) {
                    Object object = friendlist.get(i);
                    String name = ((ParseObject) object).getObjectId().toString();
                    listAdapter.add(name);


                }
            } else {
                Log.d("score", "Error: " + e.getMessage());
            }
        }
    });


}

Does anyone know how to fix this? Thanks

John DOE
  • 25
  • 1
  • 7
  • You need an adapter for listView, can't use any one of them you have to use both. Also you need to see some android examples, google it. After you reach to some point send your code here and then we will help you.You just can't directly ask for code here – Amitabh Sarkar Nov 19 '15 at 08:59
  • I tried it and there's error occurred. I've update the question for you – John DOE Nov 19 '15 at 10:10

0 Answers0