フレスコ画を使用してRecyclerView
に画像を表示しようとしています。私は自分のファイルシステムに画像を持っていて、画像の場所はString
の形式でSimpleDraweeView
に表示したいと思います。しかし、この見方で私は空のイメージを持っています。ログにエラーは表示されません。誰でも助けてくれますか?ここで私は画像を設定しようとしている私のコードです:ウリパーサが正しい結果を返すようフレスコ画に画像が表示されません
imageView.setVisibility(View.VISIBLE);
if (new File(imageData.getLocation()).exists()){
Uri fileLocationUri = Uri.parse("file:/" + imageData.getLocation());
ImageRequest request = ImageRequest.fromUri(fileLocationUri);
DraweeController controller = Fresco.newDraweeControllerBuilder()
.setImageRequest(request)
.setOldController(imageView.getController())
.setAutoPlayAnimations(true)
.build();
imageView.setController(controller);
}
画像の場所は、/
で始まった文字列です。 XMLファイル:
<com.facebook.drawee.view.SimpleDraweeView
a:id = "@+id/outgoing_photo_view"
a:layout_width="300dp"
a:layout_height="300dp"
a:adjustViewBounds="true"
a:visibility="gone"
fresco:actualImageScaleType="focusCrop"
fresco:placeholderImageScaleType="fitCenter"
fresco:failureImageScaleType="centerInside"
fresco:retryImageScaleType="centerCrop"
fresco:roundAsCircle="false"
fresco:roundedCornerRadius="1dp"
fresco:roundTopLeft="true"
fresco:roundTopRight="false"
fresco:roundBottomLeft="false"
fresco:roundBottomRight="true"
fresco:roundingBorderWidth="2dp"/>
? @VishnuM。 –
。コードでは、可視性を可視に設定します。私は空の広場を持っていますが、私はそれを持っています。 –