0

From Activity lifecycle we know, that in onResume the UI is visible. But if I set a breakpoint on onResume, I still don't see it, only after that. I heard there's some method which can check it, but I can't remind how it calls. We used it to make better animation. So how can I be fully sured that UI is ready?

VolodymyrH
  • 1,927
  • 2
  • 18
  • 47

1 Answers1

2

Add global layout listener on view you want to check. Also please make sure that you remove listener once your work is done else it will keep getting called multiple times. @onik shared a good link that should solve your problem

This ensures lay-outing. Drawing happens continuously and frame are refreshed according to sys clock. I recommend watching: https://www.youtube.com/watch?v=Q8m9sHdyXnE This will give you good idea on android drawing and layouting

Stakshi
  • 389
  • 1
  • 15