Magisk/app/src/main/res/layout/fragment_modules.xml

68 lines
2.8 KiB
XML
Raw Normal View History

2016-08-21 13:29:42 +00:00
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
2017-04-24 13:52:23 +00:00
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
2016-09-18 14:56:12 +00:00
<data>
<variable
name="viewModel"
type="com.topjohnwu.magisk.ui.module.ModuleViewModel" />
</data>
2016-09-18 14:56:12 +00:00
2018-09-10 06:27:45 +00:00
<androidx.coordinatorlayout.widget.CoordinatorLayout
2016-09-18 14:56:12 +00:00
android:layout_width="match_parent"
android:layout_height="match_parent">
2016-09-23 21:22:11 +00:00
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/modules_refresh_layout"
2016-09-23 21:22:11 +00:00
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:onRefreshListener="@{() -> viewModel.refresh()}"
app:refreshing="@{viewModel.loading}">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/modules_content"
dividerColor="@{@android:color/transparent}"
dividerSize="@{@dimen/margin_generic}"
itemBinding="@{viewModel.itemBinding}"
items="@{viewModel.itemsInstalled}"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:orientation="vertical"
android:padding="@dimen/margin_generic"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_module" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
2016-09-23 21:22:11 +00:00
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/modules_status_text"
2016-09-23 21:22:11 +00:00
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:text="@string/no_modules_found"
android:textSize="20sp"
android:textStyle="italic"
android:visibility="gone"
tools:visibility="visible" />
2016-09-23 21:22:11 +00:00
2018-09-10 06:27:45 +00:00
<com.google.android.material.floatingactionbutton.FloatingActionButton
2017-04-24 13:52:23 +00:00
android:layout_width="wrap_content"
2016-11-09 16:22:01 +00:00
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
2017-04-24 13:52:23 +00:00
android:layout_margin="@dimen/fab_padding"
android:onClick="@{() -> viewModel.fabPressed()}"
app:fabSize="normal"
app:layout_behavior="com.google.android.material.floatingactionbutton.FloatingActionButton$Behavior"
app:srcCompat="@drawable/ic_add" />
2016-11-09 16:22:01 +00:00
2018-09-10 06:27:45 +00:00
</androidx.coordinatorlayout.widget.CoordinatorLayout>
2016-09-23 21:22:11 +00:00
</layout>