我想将name.getText().toString()
放在messageIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Submit Name For "
例如:
messageIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Submit Name For " + name.getText().toString());
以便电子邮件主题中的输出为Submit Name For (Example)
由于
答案 0 :(得分:1)
只需添加这样的字符串即可。很简单:)
messageIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Submit Name For " +"("+ name.getText().toString()+")");
答案 1 :(得分:0)
您可以使用String.format()
messageIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, String.format("Submit Name For (%s)", name.getText().toString()));