fresco在xml配置中的屬性

fresco:fadeDuration="300" // 淡入淡出的持續時間
fresco:actualImageScaleType="focusCrop"  // 實際圖像的縮放類型
fresco:placeholderImage="@color/wait_color"  //佔位圖
fresco:placeholderImageScaleType="fitCenter" //佔位圖的縮放類型
fresco:failureImage="@drawable/error" //下載失敗顯示的圖片
fresco:failureImageScaleType="centerInside" //失敗圖的縮放類型
fresco:retryImage="@drawable/retrying"
//圖片加載失敗時顯示,提示用戶點擊重新加載,重複加載4次還是沒有加載出來的時候纔會顯示failureImage的圖片
fresco:retryImageScaleType="centerCrop" //重新加載的圖片縮放類型
fresco:progressBarImage="@drawable/progress_bar" //進度條圖片
fresco:progressBarImageScaleType="centerInside"
fresco:progressBarAutoRotateInterval="1000"
//進度圖自動旋轉間隔時間(單位:毫秒ms)
fresco:backgroundImage="@color/blue"
//背景圖片,這裏的背景圖片首先被繪製
fresco:overlayImage="@drawable/watermark"
// 設置疊加圖,在xml中只能設置一張疊加圖片,如果需要多張圖片的話,需要在java代碼中設置哦
fresco:pressedStateOverlayImage="@color/red"
// 設置點擊狀態下的疊加圖
fresco:roundAsCircle="false" //設置爲圓形圖
fresco:roundedCornerRadius="1dp" // 圓角半徑
fresco:roundTopLeft="true" // 左上角是否爲圓角
fresco:roundTopRight="false"
fresco:roundBottomLeft="false"
fresco:roundBottomRight="true"
fresco:roundWithOverlayColor="@color/corner_color"
fresco:roundingBorderWidth="2dp" //邊框的寬度
fresco:roundingBorderColor="@color/border_color" //邊框顏色

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章