fix [头像问题]
This commit is contained in:
parent
d8e002a8bd
commit
2ab97cb0f6
@ -12,10 +12,15 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@ -152,7 +157,13 @@ public class ImgLoader {
|
||||
if (!contextIsExist(context) || imageView == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(StringUtil.isEmpty(url)){
|
||||
return;
|
||||
}
|
||||
if (!url.startsWith("http")) {
|
||||
imageView.setImageResource(R.mipmap.chat_head_mo);
|
||||
return;
|
||||
}
|
||||
RequestBuilder<Drawable> builder = Glide.with(context)
|
||||
.load(url)
|
||||
.thumbnail(thumbnail)
|
||||
|
@ -128,7 +128,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
@SuppressLint("WrongViewCast")
|
||||
@Override
|
||||
public void init() {
|
||||
mAvatar = (ImageView) findViewById(R.id.avatar);
|
||||
mAvatar = (ImageView) findViewById(R.id.edit_me_avatar);
|
||||
redPoint = findViewById(R.id.red_point);
|
||||
ViewClicksAntiShake.clicksAntiShake(mAvatar, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
|
@ -212,7 +212,7 @@
|
||||
android:gravity="center|right">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:id="@+id/edit_me_avatar"
|
||||
android:layout_width="86dp"
|
||||
android:layout_height="86dp"
|
||||
android:layout_alignParentRight="true"
|
||||
|
Loading…
Reference in New Issue
Block a user