Android上的ParseImageView不显示图像

时间:2014-10-08 18:35:44

标签: java android web-services parse-platform imageview

我对ParseImageView有一个奇怪的问题。我的布局中定义了ParseImageView:

    <com.parse.ParseImageView
        android:id="@+id/view1_imageview"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

我正在调用方法:

imageView = (ParseImageView) rootView.findViewById(R.id.view1_imageview);

初始化imageView。

但是当我打电话时:

     pff = (ParseFile) object.get("favimg");
     Log.d("ParseFile",pff.toString());
     imageView.setParseFile(pff);

未设置图像视图。我已确认已设置ParseFile pff。 任何指针都表示赞赏。 谢谢!

1 个答案:

答案 0 :(得分:1)

您需要使用loadInBackground()来实际获取文件:

  imageView.loadInBackground(new GetDataCallback() {
            @Override
            public void done(byte[] data, ParseException e) {
                // nothing to do
                if (e != null)
                    e.printStackTrace();
            }

        });
相关问题