fresco xml配置属性不起作用
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                fresco  xml配置属性不起作用
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.                        
                                在xml中配置加載等待圖標(biāo),不起作用。
?
正確的如下:
1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:fresco="http://schemas.android.com/apk/res-auto" //注意這行代碼,之前就是因?yàn)閷懗蓆ools不起作用 4 android:id="@+id/linear_create_adver" 5 android:layout_width="match_parent" 6 android:layout_height="match_parent" 7 android:background="@color/bg_activity" 8 android:orientation="vertical"> 9 10 <com.facebook.drawee.view.SimpleDraweeView 11 android:id="@+id/iv_adver_pic" 12 android:layout_width="150dp" 13 android:layout_height="match_parent" 14 android:layout_marginTop="5dp" 15 android:layout_marginBottom="5dp" 16 android:layout_marginRight="10dp" 17 fresco:progressBarImage="@drawable/loading" 18 fresco:progressBarAutoRotateInterval="1000" 19 fresco:progressBarImageScaleType="center" 20 fresco:actualImageScaleType="fitXY"/> 21 </LinearLayout>java代碼中設(shè)置:
1 DraweeController controller = Fresco.newDraweeControllerBuilder() 2 .setUri(GlobalParams.gInitInfoEntity.getModel().getImage_url() + mAdverPicUrl) 3 .setTapToRetryEnabled(true) 4 .setOldController(ivAdverPic.getController()) 5 .build(); 6 ivAdverPic.setController(controller);?
總結(jié)
以上是生活随笔為你收集整理的fresco xml配置属性不起作用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: weblogic启动方法
- 下一篇: nexus-3本地下载jar的setti
