java - Showing toast before an intesive work of processor -


i need show toast message before method using intense processor work. problem toast shows after method, calling method in thread.

how can show toast before ?

edit: code long showing here ... resume ...

...

toast.maketext(getbasecontext(),"text", toast.length_short).show(); proccess.setrun(); 

//in proccess class implements runnable ...

public void setrun(){     thread= new thread(this);     thread.setpriority(thread.norm_priority);     thread.start();     running=true; } public void run() {         bytes=bytegroovemaker();         prepare(grbytes); } 

//bytegroovemaker() method in proccess class requires lot of processor work.

just use async task. on onpreexecute show toast, , in doinbackground method execute heavy process :)


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -