Ive created a new thread for the file browser. The stream reads the contents of the directory. I want to update the user interface stream to draw a graphical representation of files and folders. I know that I cannot update the user interface from a new thread, so I want:
while the file scan stream iterates through directories, files and folders pass the file path string back to the user interface stream. The handler in the user interface thread then draws a graphical representation of the file passed back.
public class New_Project extends Activity implements Runnable { private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { Log.d("New Thread","Proccess Complete."); Intent intent = new Intent(); setResult(RESULT_OK, intent); finish(); } }; public void fileScanner(){
source share