Android Studio - Parse.com

Tại sao khi mình lấy dữ liệu mảng trên parse.com về, 7 dòng trở xuống thì lấy được còn trên 7 dòng là không lấy được?

ParseQuery<ParseObject> query = ParseQuery.getQuery("HighScore2");
query.findInBackground(new FindCallback<ParseObject>() {
    public void done(List<ParseObject> scoreList, ParseException e) {
        if (e == null) {
            for (ParseObject cv : scoreList) {
                PlayerOnline plo = new PlayerOnline(cv.getString("PlayerName"), cv.getInt("Score"),"VietNam");
                arrayOnline.add(plo);
            }
            Collections.sort(arrayOnline, new PlayerOnlineCompartor());
             ListOnlineAdapter adapterHighScoreonline = new ListOnlineAdapter(
                    Main5Activity.this,
                     R.layout.content_high_score,
                      arrayOnline
                     );
            lvScoreOnline.setAdapter(adapterHighScoreonline);
            Toast.makeText(Main5Activity.this, "" + scoreList.size(), Toast.LENGTH_LONG).show();
        } else {

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

Những câu hỏi như thế này bạn nên kèm theo ảnh chụp của table trên Parse thì người khác mới hình dung ra được :smile:

1 Like

Là thế này anh david, em muốn lấy dữ liệu Tên người chơi (Player) và Điểm số (Score) từ trên Parse.com đổ vào ListView, Khi số người chơi được lưu trên Parse.com nhỏ hơn 7 (7 row) thì lấy dữ liệu về được, khi số người chơi tăng lên trên 7 thì không lấy dữ liệu về được nữa.
Hoặc có cách nào tự động lọc dữ liệu, ví dụ 100 người chơi gửi điểm lên Parse mình chỉ lưu trên Parse 7 người điểm cao nhất …

1 Like
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?