1, Show and handleMessage is not in the main thread.
2. ImageSize=0 is output at other points because your Show has not yet called back and the image has not been downloaded.
3. When handleMessage is executed, the thread it is on is the thread where the new Handler() passed in when you Looper is located (you used HandlerThread), so in the entire logic of handleMessage, there is no other code. Possibility of main thread execution.
The logic inside
1,
Show
andhandleMessage
is not in the main thread.2. ImageSize=0 is output at other points because your Show has not yet called back and the image has not been downloaded.
3. When
handleMessage
is executed, the thread it is on is the thread where thenew Handler()
passed in when youLooper
is located (you used HandlerThread), so in the entire logic ofhandleMessage
, there is no other code. Possibility of main thread execution.