我正在使用“Glide”将服务器上的图像加载到ImageView。我想知道是否可以从ImageView本身提取该URI。
ImageView contentImage = (ImageView) findViewById(R.id.contentImage);
........
Glide.with(getApplicationContext()).load(contentImageUrl)
.crossFade()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(contentImage);
我的目标是在ImageView中分享图像。 如何使用Glide获取ImageView上的URI?
Uri uri = ??????????????
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.setType("image/*");
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(shareIntent, "Share Image"));