如何检索从Firebase存储上载到ImageView
的图像?我已经将ImageView
从我的PC上传到存储设备,现在需要将其检索到应用程序内的ImageView
。我该怎么办?
这就是我要尝试的方式。
db.collection("Ads").document("Ads1").addSnapshotListener(new EventListener<DocumentSnapshot>() {
@Override
public void onEvent(@Nullable DocumentSnapshot documentSnapshot, @Nullable FirebaseFirestoreException e) {
String titulo = documentSnapshot.getString("titulo");
String subtitulo = documentSnapshot.getString("subtitulo");
String imagem1 = documentSnapshot.getString("imagem1");
textViewAdsTitulo.setText(titulo);
textViewAdsSub.setText(subtitulo);
imageView1.setImageURI();//Can't get i as string;
答案 0 :(得分:0)
使用毕加索
首先在build.gradle>依赖项中添加implementation 'com.squareup.picasso:picasso:2.71828
然后使用Picasso.get().load(your_url).into(your_imageView)