我正在嘗試加載存儲在分析中的圖像;使用本教程中的代碼:在我的佈局從分析/ Android中獲取圖像
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);
}
});
我有這樣的:https://parse.com/tutorials/mealspotting我寫了這個代碼
<com.parse.ParseImageView
android:id="@+id/meal_preview_image"
android:layout_width="wrap_content"
android:layout_height="200dp" />
我用這protected ParseImageView mProfilePhoto;
,一個ParseImageView。當我運行應用程序時,圖像不會出現。
檢查,如果這是在AndroidMenifest加入<使用的許可機器人:名稱= 「android.permission.INTERNET對」/> <使用的許可機器人:名稱= 「android.permission.ACCESS_NETWORK_STATE」/> –