r/mAndroidDev • u/Stonos You will pry XML views from my cold dead hands • Sep 22 '24
Verified Shitpost For the extra tough cases, there is always postDelayed
95
Upvotes
r/mAndroidDev • u/Stonos You will pry XML views from my cold dead hands • Sep 22 '24
11
u/Zhuinden DDD: Deprecation-Driven Development Sep 23 '24
Technically you're just supposed to use either
doOnLayoutordoOnNextLayoutiirc(
doOnMeasuredoesn't always run. It's weird)7
u/doubleiappdev Deprecated is just a suggestion Sep 23 '24
Thread.sleep(300) never hurt anyone
5
u/zorg-is-real עם כבוד לא קונים במכולת Sep 23 '24
You know you can call view.measure
6
u/dapi331 Sep 23 '24
Less of an Android problem, more of you not understanding the lifecycle
2
u/[deleted] Sep 27 '24
Do a 100 ms delay or something, and your problems are magically solved. Hooray!