View System
1. Add in a xml that you want to use
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler"
android:layout_height="match_parent"
android:layout_width="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</androidx.constraintlayout.widget.ConstraintLayout>
2. Add in your ViewModel the interface from the Dynamic
class YourViewModel(
val craft: CraftDView,
val repository: DynamicRepository
) : ViewModel() {
//Stuffs
}3. In your Activity/Fragment connect the Dynamic to the adapter in xml
4. Create object Properties of according with your components for example:
Properties of according with your components for example:5. Create object ViewRenders of according with your components for example:
ViewRenders of according with your components for example:6. Configure your ViewModel to accept for example:
7. Enjoy and Have fun to create a json that you need
Your json must to have at least two parameters key and value that are respective of your object for example:
Last updated