How can I make a Button more responsive?

后端 未结 4 1844
天涯浪人
天涯浪人 2020-12-03 08:53

I have noticed that some Buttons don\'t seem as responsive as they could be. This applies equally to my app and to most other apps I\'ve tried.

When I press a Button

4条回答
  •  独厮守ぢ
    2020-12-03 09:19

    So what basically happens in any Android application is that the GUI runs in the main thread. If you happen to run some other heavy stuff in the same thread, like communication, video, loops etc. these activities will definitely slow your GUI down. This has happened to my app in the past, then I moved all other processes to a separate thread each and the GUI became really real-time responsive.

提交回复
热议问题