<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical">
<Button
android:id="@+id/xml_bt_xml_loading"
android:layout_width="match_parent"
android:layout_height="45dp"
android:text="显示loading"/>
<com.facebook.drawee.view.SimpleDraweeView
android:layout_width="350dp"
android:layout_height="400dp"
fresco:progressBarImage="@mipmap/iconfont_loading"
fresco:progressBarImageScaleType="center"
android:id="@+id/xml_loading_iv_show"/>
</LinearLayout>
simpleDraweeView= (SimpleDraweeView) findViewById(R.id.xml_loading_iv_show);
simpleDraweeView.setImageURI(Uri.parse(uri));
- 效果