groupie
Moshi
Our great sponsors
groupie | Moshi | |
---|---|---|
10 | 17 | |
3,643 | 9,490 | |
- | 0.7% | |
5.8 | 8.6 | |
7 months ago | 4 days ago | |
Java | Kotlin | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
groupie
-
Fixing problems by solving the root of the problem #compost edition
I've been hearing for 2 years that the primary benefit of Compose is that you "no longer need to write a RecyclerView.Adapter", not realizing that you can use something like Groupie and effectively turn RecyclerView into adapter.setItems(listOf(Item1(), Item2())) just like in Compose.
-
Replacement for advancedrecyclerview?
https://github.com/lisawray/groupie Maybe it can help for your purposes
-
Why is Compose so difficult to learn?
Been using RecyclerView and haven't written an adapter in a very long time because you can abstract it away
-
RecyclerView with different item layout
Technically you can also use a library that hides this from you, for example I tend to use https://github.com/lisawray/groupie with BindableItem
-
What is the best way to create an expandable list?
There are also libs that help you handle this, there's gorupie here https://github.com/lisawray/groupie and also Expandable RV here https://github.com/thoughtbot/expandable-recycler-view
-
What are the most common used (3rd party) libraries and frameworks used in Android development?
RecyclerView utilities: Epoxy, Groupie, AdapterDelegates
- Does anyone else hate recyclerviews and how android handles lists.
-
Listadapter With Multiple View Types
I think Groupie is nice, although Google seems to think of each Adapter being able to describe itself "as an item view type". So you could build "multiple item view types" using a concatAdapter of N ListAdapters. Tricky.
-
How you keep the single responsibility principle in adapters/views
We've been using https://github.com/lisawray/groupie/ which offers a common GroupAdapter for all Items, so that each RecyclerView Item type can be encapsulated in its own class, Item.
-
Why is there are so much boilerplate code?
Don't write adapters or view holders for RecyclerView, use something like Groupie.
Moshi
-
Kotlin DSL is Now the Default for New Gradle Builds
Honestly, when you look at a build.gradle.kts written by someone who knows what they're doing, it's not that bad (that reminds me, I should really clean up the build.gradle.kts on my personal project, I haven't heavily edited it since I knew a lot less about gradle...). For example, here's the build.gradle.kts for Moshi, a JSON serialization library from Square. It uses the root build.gradle.kts for the project a bit, which is here. The root one is a little more complex, but that's mostly because it has to deal with a multi-release build and has to configure a few plugins, like dokka. (If you're wondering where all the library versions are, they're here, using a new feature in Gradle you might like: The version catalog)
-
Modern Android Development in 2023
Moshi
-
Why don't you write unit tests and integration tests to ksp project
This approach is also used by square/moshi. You can also refer this.
-
Apple's Swift rewrite of its Foundation framework will be open source
Best practice in Android would be Moshi, which is written by many of the same authors as Gson but is still actively maintained. It's more or less a breaking upgrade from Gson.
-
Converting Json to Java object
Thanks for the info. Just checked the GitHub and it is indeed the case that Gson is not maintained anymore. The main dev left Google it seems and therefore abandoned Gson. He and some other people however created a new project called Moshi that's probably intended as a kind of Gson 3.0: https://github.com/square/moshi the last commit was three months ago and there are a crowd of contributors listed so I guess that's the better option than ye olde Gson.
-
Soursop and Ponies in Kona: A C++ Committee Trip Report
Java annotations have enabled compile-time reflection since Java 1.6, and of course it has been used for serialization: https://github.com/square/moshi/#codegen
-
What are the most common used (3rd party) libraries and frameworks used in Android development?
JSON de/serialization: Kotlin serialization, Moshi
-
Help parsing JSON with Retrofit & Moshi
However i am getting an error "Expected BEGIN-ARRAY but was BEGIN-OBJECT at $". Looking over the moshi documentation (https://github.com/square/moshi) I think I need to use an adapter as my JSON response starts with "{ }" not the expected "[ ]". I am just struggling to understand how to implement the adapter as I think the built in adapter should work.
- Moshi 1.13.0 with Kotlin 1.6 compatibility now available
-
Release Kotlin 1.6.0 · JetBrains/kotlin
Moshi users are currently blocked to update until Moshi 1.13.0 is released: https://github.com/square/moshi/issues/1368
What are some alternatives?
Epoxy - Epoxy is an Android library for building complex screens in a RecyclerView
Jackson - Core part of Jackson that defines Streaming API as well as basic shared abstractions
expandable-recycler-view - Custom Android RecyclerViewAdapters that collapse and expand
Gson - A Java serialization/deserialization library to convert Java Objects into JSON and back
nowinandroid - A fully functional Android app built entirely with Kotlin and Jetpack Compose
kotlinx.serialization - Kotlin multiplatform / multi-format serialization
glide - An image loading and caching library for Android focused on smooth scrolling
Jackson JSON Processor - Main Portal page for the Jackson project
Permission Dispatcher - A declarative API to handle Android runtime permissions.
ktor-moshi - Ktor feature that adds Moshi JSON serialization support
ExpandableLayout - 🦚 An expandable layout that shows a two-level layout with an indicator.
LoganSquare - Screaming fast JSON parsing and serialization library for Android.