Skip to content

Commit d9e593c

Browse files
committed
UserListAdapter: 使用placeholder
1 parent 75ff962 commit d9e593c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/src/main/kotlin/com/rayfantasy/icode/ui/adapter/UserListAdapter.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import jp.wasabeef.glide.transformations.CropCircleTransformation
2323
import kotlinx.android.synthetic.main.footer_recycler_view.view.*
2424
import kotlinx.android.synthetic.main.item_recycler_code_list.view.*
2525
import kotlinx.android.synthetic.main.item_recycler_user.view.*
26-
import org.jetbrains.anko.image
2726
import org.jetbrains.anko.onClick
2827

2928
/**
@@ -68,11 +67,10 @@ class UserListAdapter(val activity: Activity, var username: String, var codeGood
6867
holder.usericon.loadPortrait(username)
6968

7069
val colorDrawable = ColorDrawable(username.hashCode().alpha(0xff).shadowColor())
71-
holder.user_bg.image = colorDrawable
7270
glide.load(PostUtil.getProfilePicUrl(username))
7371
.error(colorDrawable)
72+
.placeholder(colorDrawable)
7473
.centerCrop()
75-
.crossFade()
7674
.into(holder.user_bg)
7775
}
7876
is CodeViewHolder -> {

0 commit comments

Comments
 (0)