Because it makes you very modern and hype, so using it will inevitably give you positive Karma even on /r/androiddev where people who say they've been developing for Android for 8+ years also say they struggle to create a RecyclerView.ViewHolder every single day they ever need to write ui code (instead of time-travel debugging race conditions created by their very modern and hip MVI-based runtime loop state management running on a gajillion threads) π€ but now with Compose they're like 500x faster than they used to be, excluding IDE freezes, and the app's choppy scroll, but that's just how Android development has always been π
Languages need to rename delay/sleep/settimeout to "procrastinate", in the same vein that you need to add the "unsafe" keyword to do stuff that could bork your memory
12
u/arakelyan_movses Aug 08 '22
200ms is okay for your device,,,, what about devices that have more low performance than your device ?
34
u/Wynardtage Aug 07 '22
In the least surprising news ever, there's a new way to show/hide the software keyboard in compose!
Then you can call it like this:
of course, it wouldn't be a google library without being fucking annoying..
You need to annotate the function calling those above methods with this annotation:
Which requires you to add this garbage to your gradle module file:
My favorite part is this lovely caveat in the docs:
8
u/HuntingKingYT Aug 07 '22
Not very healthy, beware.
3
u/drabred ?.let{} ?: run {} Aug 12 '22
FFS It's 2022, a whole new UI framework and we will STILL discuss showing/hiding keyboard. What the actual f...
29
u/UchennaOkafor Aug 07 '22
Commenting so I can learn the proper way to handle his
15
u/IsuruKusumal Aug 08 '22
Android is still Android, Compose can't fix that
2
u/dpux Aug 08 '22
"higher the delay, the more slow devices can be used" - racism v2
1
u/non_eras suspend static fun Aug 08 '22
lets reinvent the wheel, and make it square - '"Jetoack compost"
1
u/anirudhgupta281998 Sep 03 '22
Lmao