question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SimpleDraweeView not visible when used in a ViewPager

See original GitHub issue

If used within view items in a ViewPager, sometimes the loaded image isn’t shown. This behavior is allways reproducable with at least four items in the pager: Swipe left three times just to swipe right three times. Then swipe one time to the left - é voilà - the SimpleDraweeView stays empty.

The ViewPager Items are as follows:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             xmlns:app="http://schemas.android.com/apk/res-auto"
             android:layout_width="match_parent"
             android:layout_height="wrap_content">

    <com.facebook.drawee.view.SimpleDraweeView
        android:id="@+id/cellDesireImage_image"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:viewAspectRatio="1.33333"
        app:placeholderImage="@drawable/empty_image"
        app:failureImage="@drawable/failure_image"
        app:placeholderImageScaleType="fitCenter"
        app:actualImageScaleType="fitCenter"
        app:progressBarImage="@drawable/image_progress"
        app:progressBarAutoRotateInterval="1000"
        app:progressBarImageScaleType="center"/>

</FrameLayout>

Leave a comment if you want to see my simple ImagePagerAdapter code.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ibitlycommented, Nov 15, 2016

@cybergen78 I have the same issue, I just used android.support.v4.view.ViewPager in a fragment, Since viewpager also have child fragments, so the activity UI is a nested fragment. It seems nothing special. The empty image just show when swipe left/right in viewpager. Could you share your solution or advice.

0reactions
IanChildscommented, Feb 22, 2016

No problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ViewPager fragments' layout not displayed - Stack Overflow
I need to use the ViewPager to display the tabs' fragments, however the fragments are not displayed at all, even though onCreateView event ......
Read more >
Using SimpleDraweeView - Fresco
When using Fresco, you will use SimpleDraweeView to display images. These can be used in XML layouts. The simplest usage example of SimpleDraweeView...
Read more >
My Experience using Fresco - Medium
Fresco is an Image Management Library for Android by Facebook. I recently worked on Replacing UIL (Universal Image Loader) with Fresco in an...
Read more >
Image Views - BigImageViewer - The Android Arsenal
FrescoImageViewFactory is a prebuilt factory, which use Fresco's SimpleDraweeView // to display animated image, both gif and webp are ...
Read more >
Java Examples for com.facebook.drawee.view ... - Javatips.net
INVISIBLE ); thumbImageView = (SimpleDraweeView) findViewById(R.id.thumb); ... getSimpleName(), bundle); fragments.add(i, fragment); } viewPager ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found