CodePudding user response:
In the android neutron thread can not directly update the UI threadCodePudding user response:
Update the UI thread in the child thread, this a year ago I a mistake operation, and suddenly found not collapse and normal operation,,,I think Google should be to modify library automatic thread cutting,
Didn't go to explore the source, of course, can share,,,
CodePudding user response:
Supposedly the child thread collapse, but the main thread run normally, looks all right, in fact the child thread code is not effective,CodePudding user response:
Just like in the child thread toast, although no flash back but toast also won't appearCodePudding user response:
Don't understand kottlin (? Suspicious), name, not an error that is a possibility, you change the UI of the operation, actually in the main thread,For example,
MTextView. PostDelayed (new Runnable () {
Public void the run () {
MTextView. SetText (" 111111111 ");
}
}, 2000);
Why don't the collapse?
CodePudding user response:
Does not collapse, when the XML within the textView for wide high match_parent for fixed values, or all, can update in a child thread, not collapse, look at the next should be related to the textView update mechanismCodePudding user response:
And TextView didn't any relationship, the child thread can't update the UI is the rules of the AndroidCodePudding user response: