2

I custom the SimpleDraweeView in my project, and the placeholderImage is using much time in my project, so I want to set the default placeholderImage, and I can remove the fresco:placeholderImage="@drawable/ic_img_loading" in my xml.

<my.packagename.CustomDraweeView
        android:id="@+id/iv_img"
        android:layout_width="match_parent"
        android:layout_height="170dp"
        fresco:placeholderImage="@drawable/ic_img_loading" />

I also tried to add this code in my CustomDraweeView

getHierarchy().setPlaceholderImage(R.drawable.ic_img_loading)

but it did not work when I added

fresco:placeholderImage="@drawable/ic_img_loading" 

in my xml. Is there any way to know the xml add the fresco:placeholderImage

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
Better
  • 165
  • 1
  • 13

0 Answers0