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

53 lines
1.9 KiB
XML
Raw Normal View History

2019-04-22 12:11:41 +00:00
<?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"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="item"
type="com.topjohnwu.magisk.model.entity.recycler.MagiskLogRvItem" />
<variable
name="viewModel"
type="com.topjohnwu.magisk.ui.log.LogViewModel" />
</data>
2019-06-12 14:08:02 +00:00
<FrameLayout
2019-04-22 12:11:41 +00:00
android:layout_width="match_parent"
android:layout_height="match_parent">
2019-06-12 14:08:02 +00:00
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
adapter="@{viewModel.itemsAdapter}"
itemBinding="@{viewModel.itemBinding}"
items="@{item.items}"
scrollPosition="@={viewModel.scrollPosition}"
scrollPositionSmooth="@{true}"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_console" />
</HorizontalScrollView>
<com.google.android.material.floatingactionbutton.FloatingActionButton
hide="@{viewModel.scrollPosition == item.items.size - 1 || item.items.size == 0}"
android:layout_width="wrap_content"
2019-06-12 14:08:02 +00:00
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/margin_generic"
android:onClick="@{() -> viewModel.scrollDownPressed()}"
app:srcCompat="@drawable/ic_arrow_down"
app:tint="@color/colorTextInverse" />
</FrameLayout>
2019-04-22 12:11:41 +00:00
</layout>