Newer
Older
MonCalc / app / src / main / res / layout / fragment_history.xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

        <variable
            name="historyViewModel"
            type="jackall.moncalc.viewmodel.HistoryViewModel" />
    </data>

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.v4.widget.SwipeRefreshLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:onRefreshListener="@{() -> historyViewModel.onRefresh()}"
            app:refreshing="@{historyViewModel.refreshLayoutLoading}">

            <android.support.v7.widget.RecyclerView
                android:id="@+id/history_recycler_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </android.support.v4.widget.SwipeRefreshLayout>
    </android.support.constraint.ConstraintLayout>
</layout>