Does the universal image downloader disappear from black?

I use Universal Image Loader to "lazily download" my images from the Internet. Is it possible to use attenuation in the animation, but disappear in the "black" rather than "off white"? My application has a black background, and I would like it to fade smoothly, and not β€œflash” in what the current effect looks like.

Here is a code that works that fades from white

DisplayImageOptions options; options = new DisplayImageOptions.Builder() .showImageOnLoading(R.drawable.no_poster) .showImageForEmptyUri(R.drawable.no_poster) .showImageOnFail(R.drawable.no_poster) .displayer(new FadeInBitmapDisplayer(500)) .cacheInMemory(true) .cacheOnDisc(true) .build(); ImageView myPosterView = (ImageView)findViewById(R.id.movieposterlarge); imageLoader.displayImage(movie_poster, myPosterView,options); 
+6
source share
1 answer

It seems to work for me.

  options = new DisplayImageOptions.Builder() .showImageOnLoading(android.R.color.black) .showImageForEmptyUri(android.R.color.black) 

Note that you also need to set the background of any kind you use to black:

 <GridView android:id="@+id/gridview" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="0dp" android:background="@color/Black" android:horizontalSpacing="0dp" android:numColumns="1" android:padding="0dp" android:stretchMode="columnWidth" android:verticalSpacing="10dp" /> 
+4
source

All Articles