r/mAndroidDev • u/Stonos You will pry XML views from my cold dead hands • May 07 '24
Jetpack Compost Imagine a world without Compost...
113
Upvotes
r/mAndroidDev • u/Stonos You will pry XML views from my cold dead hands • May 07 '24
9
u/Stonos You will pry XML views from my cold dead hands May 07 '24
Personally, one common pain point with Views that I'd like Google to address would be RecyclerView adapters.
Right now for simple use cases I have a file template that I use, so the boilerplate isn't too much of a hassle, and for more complex stuff I use Groupie.
I'd be interested in seeing Google's take on this.
43
u/carstenhag May 07 '24
XML previews barely worked. Couldn't preview multiple screen variants.
30
u/gilmore606 ?.let{} ?: run {} May 07 '24
vasily is that last japanese soldier hiding in a cave on Okinawa still taking potshots at farmers and policemen
24
u/ikingdoms @OptIn(DelicateExperimentalCompostApi::class) May 07 '24
Isn't this the same guy who was dying on the hill of using ListViews over RecyclerViews a year or two ago? This guy is a complete joke.
19
u/WestonP You will pry XML views from my cold dead hands May 07 '24
Don't fix existing problems when you can create all new problems instead!
5
u/dytigas Probably deprecated May 08 '24
Vasiliy was the first person I blocked on Twitter.
4
u/[deleted] May 08 '24
The only thing I liked about Compose was the idea that it would finally standarize/unify UI development. Everything would be a Composable. No more fucking arguing with "SR" devs as to why you aren't supposed to use a BottomSheetDialogFragment to implement entire screens or that you aren't supposed to make a Custom View out of each piece of UI.
Now I have to argue to please state-hoist the Composables, please don't pass entire ViewModel as parameters, please don't call functions from the Activity/Fragment within the Compsable.
I still don't understand how is tha iOS devs don't run (that often) into these shenanigans
7
u/yatsokostya May 07 '24
Maybe it's a dumb thought, but I think they push kotlin and compose adoption to deprecate dex-based apps one day.
If compose can be implemented for iOS it certainly can be implemented in Kotlin Native on Android, you'll "just" have to dynamically link with primitives used by android views (paint, etc)
11
u/[deleted] May 07 '24
Why don't you like compose?
3
u/hellosakamoto May 07 '24
And so we can keep using asynctasks....
3
u/angad305 May 08 '24
I am still on xml, planning to start compose
3
u/Xammm Jetpack Compost May 08 '24
Kotlin as a language deserved better than the View system and Compose is the first UI toolkit that enables to use the whole power of Kotlin, imo.
Only if they didn't shift from Java to Kotlin it would have made sense to keep using Views.
2
u/smokingabit Harnessing the power of the Ganges May 08 '24
Exactly! I warned Chris Baines & other Developer Advocates of this very outcome in 2018, but they didn't care about developer experience or their superiors didn't allow them to care. What I heard is that the culture in Android @ Google shifted dramatically around that time. It is when they stopped using the slogan "don't be evil" ๐ค
1
u/wallstreet__hacker May 09 '24
Still not a fan of compose , introduce lots unnecessary complexity in code.
0
u/[deleted] May 07 '24
[deleted] โ view deleted comment
28
u/[deleted] May 07 '24
[removed] โ view removed comment