Android: How to use TextView in placeholder of Glide or Picasso

瘦欲@ 提交于 2021-01-28 03:40:21

问题


i am using Glide or Picasso for loading the image like

Glide.with(context).load(POST_IMAGE).placeholder(R.drawable.loading_img).error(R.drawable.bg_480_800).into(image);

Picasso.with(context).load("image url").error(R.drawable.bg_480_800).placeholder(R.drawable.loading_img).into(holder.imageURL);

In these two, i'm using image as place holder from the drawable folder. Now i want to use text inside the place holder instead of image from drawable folder.

So, please help me to load text instead of loading image from the drawable folder


回答1:


Placeholder is a Drawable, so what you'll need is some kind of Drawable that is able to display text. This library does exactly that, and does it pretty well.



来源:https://stackoverflow.com/questions/36306550/android-how-to-use-textview-in-placeholder-of-glide-or-picasso

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!