3

I'm using fresco image viewer on my app for showing post photos when clicked make it full screen. It was working last week, i didn't changed anything in my code but now it doesn't work.

Here is my showFullScreen function

    public void showFullScreenImage(final Context activity, final String imageURL) {
    Handler handler = new Handler(activity.getMainLooper());
    handler.post(new Runnable() {
        public void run() {
            try {
                List<String> pictures = new ArrayList<>();
                pictures.add(imageURL);

                GenericDraweeHierarchyBuilder hierarchyBuilder = GenericDraweeHierarchyBuilder.newInstance(mContext.getResources())
                        .setFailureImage(R.drawable.error)
                        .setProgressBarImage(new ProgressBarDrawable());

                new ImageViewer.Builder<>(activity, pictures).setCustomDraweeHierarchyBuilder(hierarchyBuilder).setStartPosition(0).show();

            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
    });
}

It shows black screen, but it's not freezing, i can swipe to dismiss the view.

Mami
  • 197
  • 1
  • 9
  • check image url if exists – g7pro Aug 18 '17 at 15:18
  • I checked and the URL is coming when there is no URL it shows error view. When there is no URL error view works like a charm but when there is it shows black screen – Mami Aug 19 '17 at 16:28

1 Answers1

3

Okay I found the solution, upgrade all repos the final update from build.gradle fresco and frescoImageViwer than it'll be work.

Mami
  • 197
  • 1
  • 9