【发布时间】:2018-08-14 10:45:18
【问题描述】:
我想分享多张带有单个标题的图片,该标题显示在一张图片上,而不是所有图片上。但是标题将显示在一次共享的每张图片上。
这是我的代码
private void pic_with_data() {
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.setPackage("com.whatsapp");
shareIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUriArray);
shareIntent.putExtra(Intent.EXTRA_TEXT, "Download this App");
shareIntent.setType("text/plain");
shareIntent.setType("image/jpeg");
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
try {
startActivity(Intent.createChooser(shareIntent, "Share Image!"));
startActivity(shareIntent);
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(this, "Whatsapp have not been installed.", Toast.LENGTH_SHORT).show();
}
}
【问题讨论】:
-
您所说的单个标题是什么意思,它只显示在一张图片上,而不是全部。但是标题会显示在每张图片上 ??
-
-
每张图片中的文本都相同为此我建议创建带有文本的位图并将所有图像放入数组列表共享列表中
-
Mohit,请分享一些方法
-
我可以分享你的方法.. 但我所指的过程将在图像上打印文本,然后将转换为位图,创建后不会更改(如书签),但我可以看到你是发送 下载此应用 消息以及手动输入的每张图片
标签: android android-intent share whatsapp