我想在imageView中显示图像,这就是我正在做的事情:我正在使用FirebaseUI来显示来自FireBase Storage的图像.
FirebaseStorage storageDisplayImg;
StorageReference storageRef;
private FirebaseAuth auth;
storageDisplayImg=FirebaseStorage.getInstance();
auth = FirebaseAuth.getInstance();
FirebaseUser userConnect = auth.getCurrentUser();
String id_user=userConnect.getUid();
storageRef = storageDisplayImg.getReference().child(item.getChemin_image()); // return gs://mydreambook-32321.appspot.com/images/test23-03-2017_16:46:55
if (item.getChemin_image() != null&&id_user != null) {
Glide.with(convertView.getContext() )
.using(new FirebaseImageLoader())
.load(storageRef)
.into(profilePic);
profilePic.setVisibility(View.VISIBLE);
} else {
profilePic.setVisibility(View.GONE);
}
Run Code Online (Sandbox Code Playgroud)
但我有这个错误:
StorageException has occurred. Object does not exist at location. Code: -13010 HttpResult: 404
Run Code Online (Sandbox Code Playgroud)
更新,存储FireBase中的图像
我试图将LinearLayout放在另一个RelativeLayout内的LinearLayout下面?
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/background_linearlayout_reportdelay"
>
</LinearLayout>
</RelativeLayout>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
有什么方法可以做到吗?
谢谢