So I have been thinking about it for a long time. Is there a way that can generate a List of Custom Class
according to the sampledata
used in the recycler view item? It can help in testing UI and save alot time.
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/posts_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/layout_item_post" />
For Example in this recycler view i have used tools:listitem="@layout/layout_item_post"
In that layout file, I have used these sample data
tools:src="@tools:sample/avatars"
tools:text="@tools:sample/full_names"
tools:src="@tools:sample/backgrounds/scenic"
What I want is something that can automatically create a custom class from sample data.
class Post {
private String name;
private String userImage;
private String postImage;
}
If you know about some tool, a dependency that can do that let me know or you can give me some guidance to build it. Thanks