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.
Asked
Active
Viewed 45 times
0

enfix
- 6,680
- 12
- 55
- 80
-
1You can use `Sharedpreference` . – KeLiuyue Nov 10 '17 at 01:17
1 Answers
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