Toast not showing at the right time
<p>On the click of a button I want to show a Toast Message while there is some work being done but even through I have it at the start the toast is not being shown until the end</p>

<pre><code>if (id == R.id.edit_score_button_update) {

Toast.makeText(this, "Updating please wait", Toast.LENGTH_LONG).show();

//Some code that update database

finish();
</code></pre>

<p>What is the best way to force the toast to be shown first. Thanks for your time</p>
