Java 有没有办法使用ACTION_SEND在google plus上发布多张图片
我正在开发一个Android应用程序,在这个应用程序中,我从Url获取图像。我必须在Google+上共享多个图像。一个图像工作正常。请建议。 我使用下面的和平的代码Java 有没有办法使用ACTION_SEND在google plus上发布多张图片,java,android,android-intent,Java,Android,Android Intent,我正在开发一个Android应用程序,在这个应用程序中,我从Url获取图像。我必须在Google+上共享多个图像。一个图像工作正常。请建议。 我使用下面的和平的代码 Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.putExtra(Intent.EXTRA_SUBJECT, curentWit.getWit_name());
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_SUBJECT, curentWit.getWit_name());
shareIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(shrd).toString());
if(isInLine == 1)
{
shareIntent.putExtra(Intent.EXTRA_STREAM, uris.get(0));
}
shareIntent.setType("text/plain");
startActivity(shareIntent);
我不知道Google Plus是否允许你同时发送多张图片。但是,如果您希望在发送电子邮件时同时发送多个图像,则应使用Intent.ACTION\u send\u multiple而不是Intent.ACTION\u send 这就是我通过电子邮件发送多张图片的方式
Intent shareIntent = null;
if(uris.size > 1) {
shareIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
shareIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
}
else {
if (uris.size() == 1) {
shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, uris.get(0));
}
}
shareIntent.setType("image/*");
shareIntent.putExtra(Intent.EXTRA_SUBJECT, curentWit.getWit_name());
shareIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(shrd).toString());
startActivity(shareIntent);
Apurva关于gridview还有一个问题。我们可以自定义gridview,根据网格宽度自动调整列吗columns@VinayakMishra对您可以调整gridview列的宽度。如果第一行中有两个项,则可以调整下一行中的三个项show@VinayakMishra你应该使用android:numColumns=auto_-fit属性,它将调整每行中尽可能多的元素。你能回答我将要发布的另一个问题吗。