How to put image http url in placeholderImage by xml?
like this:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
fresco:placeholderImage="http://www.smemo.info/icon.png" />
with DataBinding:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
fresco:placeholderImage="@{imageBean.url}" />
SimpleDraweeView is not "Data Binding compatible" at the moment and we don't have plan to do that in short period. In order to do so please feel free to create your pull request we'll be happy to approve.
Thanks
You can do it by adding a custom xml attribute with data binding and then loading the image in the (@BindingAdapter) annotated callback for that attribute. https://mpetersen3.wordpress.com/2016/09/09/data-binding-with-frescos-simpledraweeview/
Most helpful comment
You can do it by adding a custom xml attribute with data binding and then loading the image in the (@BindingAdapter) annotated callback for that attribute. https://mpetersen3.wordpress.com/2016/09/09/data-binding-with-frescos-simpledraweeview/