Abh*_*rni 1 android imageview android-glide
我的驱动器网址是 - https://drive.google.com/file/d/0B3DFHb2-MdGYa2NMUkVtVkZ1V1k/view?usp=sharing
我想使用 glide 在 android imageview 中显示它。我尝试了很多方法来展示它。以下是我要显示的代码 -
Glide.with(getActivity()).load(readExcelFeed.getImage().toString()).into(ivQueImage);
Run Code Online (Sandbox Code Playgroud)
请让我知道其中有什么问题。
小智 7
通过 Glide 库将图像从 Google 驱动器加载到 ImageView 的步骤
第 1 步:在您的 Drive 中选择要在 ImageView 上显示的图像。您需要从谷歌驱动器的三个点中获取可共享的链接。像这样“ https://drive.google.com/open?id=139jBj_GUfmFi_pZN38SS9RMB5wNXMEy9 ”
第 2 步:然后是用于显示图像的基本 url。链接是公共静态字符串 BASE_URL = " https://drive.google.com/uc?id= ";
第 3 步:在第 1 步中,您会看到图像的 id,然后将此 id 添加到基本 URL 中。喜欢这种类型“ https://drive.google.com/uc?id=139jBj_GUfmFi_pZN38SS9RMB5wNXMEy9 ”
第 4 步:使用 Glide 库在 ImageView 上显示图像,如下所示:
Glide.with(mContext)
.load("https://drive.google.com/uc?id=139jBj_GUfmFi_pZN38SS9RMB5wNXMEy9")
.into(holder.user_image);
Run Code Online (Sandbox Code Playgroud)
现在您可以在 ImageView 上看到您的图像。
| 归档时间: |
|
| 查看次数: |
2994 次 |
| 最近记录: |