不得不问这个问题我感到很愚蠢,但我找不到如何从多个 EditText 视图中获取 UI 信息并将其放置在电子邮件正文中。仅供参考,我的意图是,我只想填充消息正文。
Intent buildingfireemail = new Intent(android.content.Intent.ACTION_SEND);
buildingfireemail.setType("plain/text");///.setType("message/rfc822")
buildingfireemail.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"to@email.com"});
buildingfireemail.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
buildingfireemail.putExtra(android.content.Intent.EXTRA_TEXT, "Text"
//////////////I need to add data from 80+ views into here.
);try {
startActivity(Intent.createChooser(buildingfireemail, "Send mail..."));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(BuildingFireActivity.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
}