Question

I am trying to show toast on inserting content into the database. and then it finishes the activity.

  1. Send Mail
  2. Store Mail in Db
  3. If Successfull show Toast for 10sec
  4. finish(); Activity and return to the previous one.

code: http://pastebin.com/6aBjwCFh

Was it helpful?

Solution

You need to show() your toast to display it:

Toast.makeText(ComposeActivity.this, "Mail Sent to " + tousername, 10).show();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top