mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-09-15 08:20:18 +03:00
Show placeholders while profile pictures are loading
This commit is contained in:
parent
efe5718526
commit
58e2457cf5
1 changed files with 3 additions and 0 deletions
|
@ -1163,6 +1163,7 @@ public class Helper {
|
||||||
if (Helper.isValidContextForGlide(activity)) {
|
if (Helper.isValidContextForGlide(activity)) {
|
||||||
Glide.with(activity)
|
Glide.with(activity)
|
||||||
.asDrawable()
|
.asDrawable()
|
||||||
|
.placeholder(R.drawable.ic_person)
|
||||||
.load(avatar)
|
.load(avatar)
|
||||||
.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
||||||
.into(view);
|
.into(view);
|
||||||
|
@ -1176,6 +1177,7 @@ public class Helper {
|
||||||
try {
|
try {
|
||||||
RequestBuilder<Drawable> requestBuilder = Glide.with(activity)
|
RequestBuilder<Drawable> requestBuilder = Glide.with(activity)
|
||||||
.asDrawable()
|
.asDrawable()
|
||||||
|
.placeholder(R.drawable.ic_person)
|
||||||
.load(targetedUrl)
|
.load(targetedUrl)
|
||||||
.thumbnail(0.1f);
|
.thumbnail(0.1f);
|
||||||
if (crop) {
|
if (crop) {
|
||||||
|
@ -1187,6 +1189,7 @@ public class Helper {
|
||||||
} else {
|
} else {
|
||||||
RequestBuilder<GifDrawable> requestBuilder = Glide.with(activity)
|
RequestBuilder<GifDrawable> requestBuilder = Glide.with(activity)
|
||||||
.asGif()
|
.asGif()
|
||||||
|
.placeholder(R.drawable.ic_person)
|
||||||
.load(targetedUrl)
|
.load(targetedUrl)
|
||||||
.thumbnail(0.1f);
|
.thumbnail(0.1f);
|
||||||
if (crop) {
|
if (crop) {
|
||||||
|
|
Loading…
Reference in a new issue