Search in sources :

Example 26 with FadeDrawable

use of com.facebook.drawee.drawable.FadeDrawable in project fresco by facebook.

the class GenericDraweeHierarchyTest method testHierarchy_WithPlaceholderImage.

@Test
public void testHierarchy_WithPlaceholderImage() throws Exception {
    GenericDraweeHierarchy dh = mBuilder.setPlaceholderImage(mPlaceholderImage, ScaleType.CENTER).build();
    RootDrawable rootDrawable = (RootDrawable) dh.getTopLevelDrawable();
    FadeDrawable fadeDrawable = (FadeDrawable) rootDrawable.getCurrent();
    assertScaleTypeAndDrawable(mPlaceholderImage, ScaleType.CENTER, fadeDrawable.getDrawable(1));
    verifyCallback(rootDrawable, mPlaceholderImage);
}
Also used : FadeDrawable(com.facebook.drawee.drawable.FadeDrawable) Test(org.junit.Test)

Aggregations

FadeDrawable (com.facebook.drawee.drawable.FadeDrawable)26 Test (org.junit.Test)22 ForwardingDrawable (com.facebook.drawee.drawable.ForwardingDrawable)4 RoundedCornersDrawable (com.facebook.drawee.drawable.RoundedCornersDrawable)3 ScaleTypeDrawable (com.facebook.drawee.drawable.ScaleTypeDrawable)3 StateListDrawable (android.graphics.drawable.StateListDrawable)2 PointF (android.graphics.PointF)1 BitmapDrawable (android.graphics.drawable.BitmapDrawable)1 ColorDrawable (android.graphics.drawable.ColorDrawable)1 Drawable (android.graphics.drawable.Drawable)1 MatrixDrawable (com.facebook.drawee.drawable.MatrixDrawable)1 Rounded (com.facebook.drawee.drawable.Rounded)1 RoundedBitmapDrawable (com.facebook.drawee.drawable.RoundedBitmapDrawable)1 ScaleType (com.facebook.drawee.drawable.ScalingUtils.ScaleType)1