0

in my Android app I need to send any changes from my UI to a thread.
User changes a textview and I need to get value and sent to thread processing. Is it possible ?
I have see only solutions from thread to UI (via runOnUiThread), but not UI to thread.

enfix
  • 6,680
  • 12
  • 55
  • 80

1 Answers1

1

you can write your own custom Thread

public static class MyThread extends Thread{
        Object yourData;
        // write your get/set data
        // override the run function.
}

After that, you can change your thread easily. However, you should remember that you can not reuse the thread.

Kingfisher Phuoc
  • 8,052
  • 9
  • 46
  • 86