在Parse中检索数字

时间:2014-09-02 02:13:29

标签: java android parse-platform

我已经能够在Parse中检索字符串和文件。但是,我很难从数字列中检索数字。特别是,我想从Parse中检索数字并将其转换为显示数字的TextView

以下是我必须检索字符串的代码:

@Override
public void done(List<ParseUser> objects,ParseException e) {
    for(int i=0;i<objects.size();i++){
        // Do whatever you need to extract object from "users"
        ParseQuery<ParseObject> query = ParseQuery.getQuery("User");
        query.whereNotEqualTo("objectId", ParseUser.getCurrentUser()
                .getObjectId());
        // users with Gender = currentUser.Looking_Gender
        query.whereEqualTo("Gender", userLookingGender);
        // users with Looking_Gender = currentUser.Gende r
        query.whereEqualTo("Looking_Gender", userGender);
        query.setLimit(1);
        query.whereEqualTo("ActivityName", activityName);
        // query.whereGreaterThanOrEqualTo("Age", minimumAge);
        // query.whereLessThanOrEqualTo("Age", maximumAge);

        mUserAgeRetrieved = (TextView) getActivity().findViewById(R.id.userlistage);
        mUserAgeRetrieved.setText(objects.get(i).get("Age").toString()); 
    }//for loop
}

特别是,我希望将以下行转换为数字而不是字符串

mUserAgeRetrieved.setText(objects.get(i).get("Age").toString());

我该怎么做?

0 个答案:

没有答案