Android: why Thread in getView() does not seem to work?

前端 未结 3 1136
太阳男子
太阳男子 2021-01-27 15:35

I would expect this (inside getView()) to work...

but nothing happens, the bitmaps are not loaded into the ImageView....

Thread th= new Thr         


        
3条回答
  •  北荒
    北荒 (楼主)
    2021-01-27 16:22

    Only the UIThread can change its views. I suggest to use runOnUIThread() method from Activity.

    More info: https://developer.android.com/training/multiple-threads/communicate-ui.html

提交回复
热议问题