[英]Mail screen scrolls down to the bottom
I am invoking a mail intent in 我正在调用一个邮件目的
ImageButton mail=(ImageButton)findViewById(R.id.mailgps);
mail.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setContentView(R.layout.mail);
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
// TODO Auto-generated method stub
emailIntent.setType("text/plain");
String emailto[]={"myemail"};
String subject="GPS User Report";
String body="Welcome to Samarth Reporting service.Did you see an untracked Dustbin\n.A dustbin not at the right place??\nWant to suggest placement of a dustbin here.\nGo ahead we are all ears.\n.Your present location is\n Latitude: ";
body=body + "28.67890" + " and Longitudes: " + "79.78965";
body=body + "\n\nTell us more.";
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,emailto);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,body);
startActivity(emailIntent);
}
});
and getting the screen like this which ignores the EXTRA_EMAIL attribute as well as EXTRA_SUBJECT and then the body appears at the very bottom.How can I rectify this.?? 并得到这样的屏幕,它忽略EXTRA_EMAIL属性以及EXTRA_SUBJECT,然后主体出现在最底下。我该如何纠正。
Well it was a pretty stupid thing. 好吧,这是一件非常愚蠢的事情。 As earlier I was using another AVD I had the email client setup so it worked nicely.But on the new AVD I overlooked that.So "first" setup the email client then go for invoking intent.
早先我使用另一个AVD时,我已经设置了电子邮件客户端,因此可以很好地工作。但是在新的AVD上,我却忽略了这一点。因此,“首先”设置电子邮件客户端,然后调用意图。 Nonetheless the system should have a better way of handling such situations rather than showing a weird blank screen.
尽管如此,系统应该有更好的方式处理此类情况,而不是显示怪异的黑屏。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.