I have some main activity and clicking on a button it launches a custom dialog window. Within the dialog I have button "Send email" which calls an e-mail chooser (via simple method call) when user click on the button.
sendEmail();
And here is the sendEmail() method
public void sendEmail() {
String email = "some.email@gmail.com";
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/plain");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{email});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Message");
mContext.startActivity(Intent.createChooser(emailIntent, "Choose an email"));
}
But on my HTC Desire (2.2) sometimes the dialog starts blinking. Simply I cannot click on anything, I must quit an application OR I just rotate it in landscape and back and then flashing/blinking stops.
Where is the problem? Why is it blinking?
UPDATE: I tried to log "multiple calls" to sendEmail function or CreateDialog constructor but no, everything is called just one, after that I have this in my log... I could solve it to make another activity which will act like a dialog but I wanna know where is the problem here :/
Log
02-15 19:06:45.605 D/SurfaceFlinger( 92): Layer::setBuffers(this=0x9a9478), pid=12757, w=1, h=1
02-15 19:06:45.605 D/SurfaceFlinger( 92): Layer::setBuffers(this=0x9a9478), pid=12757, w=1, h=1
02-15 19:06:45.675 D/SurfaceFlinger( 92): Layer::requestBuffer(this=0x92b350), index=1, pid=12757, w=443, h=337 success
02-15 19:06:45.715 D/SurfaceFlinger( 92): Layer::requestBuffer(this=0x9a9478), index=0, pid=12757, w=480, h=762 success
02-15 19:06:45.755 I/UsageStats( 92): Unexpected resume of android while already resumed in android
02-15 19:06:45.815 D/SurfaceFlinger( 92): Layer::setBuffers(this=0x9a9478), pid=12757, w=1, h=1
02-15 19:06:45.815 D/SurfaceFlinger( 92): Layer::setBuffers(this=0x9a9478), pid=12757, w=1, h=1
02-15 19:06:45.895 D/SurfaceFlinger( 92): Layer::requestBuffer(this=0x9a9478), index=0, pid=12757, w=480, h=762 success