【发布时间】:2015-05-09 18:12:43
【问题描述】:
我正在尝试加载存储在 Parse 中的图像;使用本教程中的代码:https://parse.com/tutorials/mealspotting 我写了这段代码:
mProfileImage = mCurrentUser.getParseFile("ProfilePhoto");
mProfilePhoto = (ParseImageView) findViewById(R.id.meal_preview_image);
mProfilePhoto.setParseFile(mProfileImage);
mProfilePhoto.loadInBackground(new GetDataCallback() {
@Override
public void done(byte[] data, ParseException e) {
mProfilePhoto.setVisibility(View.VISIBLE);
}
});
我的布局中有这个:
<com.parse.ParseImageView
android:id="@+id/meal_preview_image"
android:layout_width="wrap_content"
android:layout_height="200dp" />
我正在使用这个 protected ParseImageView mProfilePhoto;,一个 ParseImageView。当我运行应用程序时,图像没有出现。
【问题讨论】:
-
检查这个是否被添加到AndroidMenifest