holder.txcom.setText("Comments: "+wtm.getWorkcom());
Picasso.get().load(wtm.getImageurl()).into(holder.imgwaste);
Toast.makeText(context, ""+wtm.getImageurl(), Toast.LENGTH_SHORT).show();
这是我的代码,用于从Firebase检索图像。我使用了Glide和Picasso,但没有显示图像。在Toast中,图像链接可以显示存储在Firebase数据库上的链接。但不显示图像。
1)将上下文添加到yourAdapter构造器:
public yourAdapter(Context context){
this.context=context;
}
2)并尝试此
Picasso.with(context).load(yourUrl).into(imageView);