All Projects → natario1 → Elements

natario1 / Elements

Licence: apache-2.0
⚒ Modular components for RecyclerView development enforcing clean, reusable and testable code, with built-in support for paging and complex hierarchies of data.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Elements

Simple-Notes-Kotlin-App
✍️ Simple Note Making App use mvvm architecture , dagger , coroutines and navigation component. Features includes 🗒️ create , edit and ❌ delete notes
Stars: ✭ 40 (-46.67%)
Mutual labels:  recyclerview, livedata, architecture-components
livedata-recyclerview-sample
No description or website provided.
Stars: ✭ 76 (+1.33%)
Mutual labels:  recyclerview-adapter, livedata, architecture-components
Base Mvvm
App built to showcase basic Android View components like ViewPager, RecyclerView(homogeneous and heterogeneous items), NavigationDrawer, Animated Vector Drawables, Collapsing Toolbar Layout etc. housed in a MVVM architecture
Stars: ✭ 18 (-76%)
Mutual labels:  architecture-components, livedata, recyclerview
LifecycleCells
An Android library that provides a Lifecycle to any ViewHolder through the implementation of the LifecycleOwner interface, allowing it to interact with a Lifecycle-Aware Component.
Stars: ✭ 19 (-74.67%)
Mutual labels:  recyclerview, livedata, architecture-components
Flagchatadapter
FlagChatAdapter is easy to implement enchanting recycler view adapter. Just extend your adapter with FlagChatAdapter, impliment some methods and voila! You have got the most beautiful looking chat on your phone. Zero boilerplate code, just put your variables in the right direction.
Stars: ✭ 39 (-48%)
Mutual labels:  recyclerview, recyclerview-adapter
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-80%)
Mutual labels:  recyclerview, recyclerview-adapter
Firestorerecycleradaptersample
Sample Android project using FirestoreRecyclerAdapter
Stars: ✭ 43 (-42.67%)
Mutual labels:  recyclerview, recyclerview-adapter
Kotlin Pokedex
🌀 A Pokedex app using ViewModel, LiveData, Room and Navigation
Stars: ✭ 1,156 (+1441.33%)
Mutual labels:  architecture-components, livedata
Multiviewadapter
Easily create complex recyclerview adapters in android
Stars: ✭ 801 (+968%)
Mutual labels:  recyclerview, recyclerview-adapter
Readhubclient
Readhub客户端
Stars: ✭ 44 (-41.33%)
Mutual labels:  architecture-components, livedata
Rendererrecyclerviewadapter
A single adapter with multiple view types for the whole project
Stars: ✭ 1,061 (+1314.67%)
Mutual labels:  recyclerview, recyclerview-adapter
Recyclerviewtest
RecyclerView 实践学习的demo,其中有基本的列表,表格,瀑布流,进阶的,等等
Stars: ✭ 23 (-69.33%)
Mutual labels:  recyclerview, recyclerview-adapter
Tdcapp
Sample app which access the TDC (The Developer's Conference) REST API.
Stars: ✭ 55 (-26.67%)
Mutual labels:  architecture-components, livedata
Retrofit Recyclervew
An implementation of a RecyclerView using Retrofit and Glide to create a movie list
Stars: ✭ 40 (-46.67%)
Mutual labels:  recyclerview, recyclerview-adapter
Expandablerecyclerview
A very simple example of how the expandable RecyclerView can be implemented
Stars: ✭ 16 (-78.67%)
Mutual labels:  recyclerview, recyclerview-adapter
Recyclerview Concatadapter
Sample to practice RecyclerView ConcatAdapter
Stars: ✭ 47 (-37.33%)
Mutual labels:  recyclerview, recyclerview-adapter
Retrokotlin
Simple Android app to show how unit testing with MockWebServer and Architecture Components (ViewModel + LiveData)
Stars: ✭ 55 (-26.67%)
Mutual labels:  architecture-components, livedata
Githubprojectbrowser
This is a sample Android Project that is based on Clean Architecture
Stars: ✭ 64 (-14.67%)
Mutual labels:  architecture-components, livedata
Autorecycleradapter
Automated configuration RecyclerView.Adapter for Android
Stars: ✭ 67 (-10.67%)
Mutual labels:  recyclerview, recyclerview-adapter
Codeview Android
Display code with syntax highlighting ✨ in native way.
Stars: ✭ 748 (+897.33%)
Mutual labels:  recyclerview, recyclerview-adapter

Build Status Release Issues

Need support, consulting, or have any other business-related question? Feel free to get in touch.

Like the project, make profit from it, or simply want to thank back? Please consider sponsoring me!

Elements

A collection of modular elements for RecyclerView lists, alternative to Google's Paging library, designed in Kotlin with these goals in mind:

implementation("com.otaliastudios:elements:0.5.0")

Design features:

  • Separation of concerns: we split the model component into Sources, and the UI component into Presenters. [docs]
  • Simplicity: No need to extend Adapters, ViewHolders or all that Paging lib. boilerplate.
  • Reusability: as a result, each Source and Presenter is an independent piece of code that can be reused.
  • Modularity: let the adapter accept multiple Sources and Presenters. [docs]
  • Testability: a consequence of the above, each component can be independently tested.
  • Coordination: let Sources declare dependencies among them, in a CoordinatorLayout.Behavior fashion. [docs]
  • Paging: built-in concept of Page. [docs]
  • Integration with Arch components: heavy use of LiveData and Lifecycles, extensions for data binding.
  • Animations: give Presenterss fine grained control over how to animate each item [docs]

If you are curious about how it works in practice, take a look at the sample app in the app module.

Support

If you like the project, make profit from it, or simply want to thank back, please consider sponsoring me through the GitHub Sponsors program! You can have your company logo here, get private support hours or simply help me push this forward.

Feel free to contact me for support, consulting or any other business-related question.

Setup

Please read the official website for setup instructions and documentation. You might also be interested in our changelog. After migrating
to Elements, your code will look like the examples below.

Simplest single-paged list:

val data = listOf("Monday", "Tuesday", "Wednesday", "Friday", "Saturday", "Sunday")
Adapter.builder(lifecycle)
    .addSource(Source.fromList(data))
    .addPresenter(Presenter.simple(context, R.layout.item, { view, day -> view.text = day }))
    .into(recyclerView)

Paged list with multiple sources and presenters, headers, ads, error/empty indicators and progress bars:

Adapter.builder(lifecycle)
    .addSource(ContactsSource()) // Add a paged list of contacts
    .addSource(ContactsHeaderSource()) // Add the letters A, B, C as a header
    .addSource(AdSource(5)) // Add some ads each 5 items
    .addPresenter(ContactsPresenter(context))
    .addPresenter(ContactsHeaderPresenter(context))
    .addPresenter(AdPresenter(context))
    .addPresenter(Presenter.forLoadingIndicator(context, R.layout.loading))
    .addPresenter(Presenter.forErrorIndicator(context, R.layout.error))
    .addPresenter(Presenter.forEmptyIndicator(context, R.layout.empty))
    .into(recyclerView)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].