-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ItemLayoutBinding #4
Comments
ItemLayoutBinding represents the generated Binding from the xml layout file. <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/activity_horizontal_margin">
<TextView android:id="@+id/textViewItem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Recycler Item"/>
</LinearLayout>
</layout> Then in code you'll be creating RxDataSource like this RxDataSource<String> rxDataSource = new RxDataSource<>(dataSet);
//compose, bind and subscribe!
rxDataSource.<HeaderLayoutBinding>bindRecyclerView(recyclerView, R.layout.header_layout)
.subscribe(viewHolder -> {
...
}); Make sure you have DataBinding enabled in your build.gradle file. For more detailed information and examples, refer to this article. |
thank you very much! |
Also make sure to have you layout starting with
otherwise binding won't show up at all Still mine doesn't compile |
can you tell me... ItemLayoutBinding? thanks!
The text was updated successfully, but these errors were encountered: