Home > Mobile >  Glide loads the default pictures and scaleType
Glide loads the default pictures and scaleType

Time:04-02

There is a default image, when ImageView displaying (image using Glide as a loading frame), there are some requirements:
1. There is no picture showing a pure color rounded rectangle + default image as placehoder (the default image centered, centerInside)
2. Have pictures showing the corresponding image (centerCrop), before loading, the placehoder in use 1

Now, the problem of
1. Only use background and SRC to switch back and forth ImageView display Settings;
2. There are pictures show placehoder need centerInside, it needs to be the real images show centerCrop;

Excuse me, is there a simple way, can achieve this function?

CodePudding user response:

Can write their own a drawable
 

XMLNS: android="http://schemas.android.com/apk/res/android" & gt;




Android: gravity="center" & gt;

The android: SRC="/" & gt;





  • Related