Lets say i am in another thread that i created and in android i do the following:
//this is called from another thread (not mainTread)
new Handler(Lopper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
mAdapter.notifyDataSetChanged();
}
});
am i to understand that the handler here is associated with the thread but since i'm using the mainThreads looper that it will send the runnable to the mainThreads message queue for processing ? and if thats true that any handler on any thread can accept another threads looper to post to it ? is that correct ?
Or is it that "new Handler(Lopper.getMainLopper())" makes this a mainThread handler ?
Yes, you've got it right.
I would recommend to take a glance at this article to grasp the better understanding of this issue.