java - Wait for a thread before continue on Android -
i've 1 thread, i'd wait finish before continue next actions. how it?
new thread( new runnable() { @override public void run() { mensaje = getfilesfromurl(value); } }).start();
here i'd put (but loops) knows when thread finishes , evaluate result (mensaje)
btnok.setvisibility(view.visible); progressbar.setvisibility(view.gone); lblestado.settext(mensaje); if(mensaje.equals("importado")) startactivity(new intent(scanurl.this, mainactivity.class));
thread t = new thread(new runnable() { @override public void run() { mensaje = getfilesfromurl(value); }}); t.start(); // spawn thread t.join(); // wait thread finish
Comments
Post a Comment