2019-10-17 18:57:00 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2020-03-24 18:07:20 +01:00
|
|
|
<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">
|
2019-10-17 18:57:00 +02:00
|
|
|
|
|
|
|
<data>
|
|
|
|
|
|
|
|
<variable
|
|
|
|
name="viewModel"
|
2020-01-13 00:43:09 +08:00
|
|
|
type="com.topjohnwu.magisk.ui.flash.FlashViewModel" />
|
2019-10-17 18:57:00 +02:00
|
|
|
|
|
|
|
</data>
|
|
|
|
|
2020-03-24 18:07:20 +01:00
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
2019-10-17 18:57:00 +02:00
|
|
|
android:layout_width="match_parent"
|
2020-03-24 18:07:20 +01:00
|
|
|
android:layout_height="match_parent">
|
2019-10-17 18:57:00 +02:00
|
|
|
|
2020-03-24 18:07:20 +01:00
|
|
|
<HorizontalScrollView
|
2019-10-17 18:57:00 +02:00
|
|
|
android:layout_width="match_parent"
|
2020-03-24 18:07:20 +01:00
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_marginTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
|
|
|
|
tools:layout_marginTop="@dimen/internal_action_bar_size">
|
2019-10-17 18:57:00 +02:00
|
|
|
|
2020-03-24 18:07:20 +01:00
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
android:id="@+id/flash_content"
|
|
|
|
adapter="@{viewModel.adapter}"
|
|
|
|
itemBinding="@{viewModel.itemBinding}"
|
|
|
|
items="@{viewModel.items}"
|
|
|
|
scrollToLast="@{true}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:clipToPadding="false"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingLeft="@{viewModel.insets.left}"
|
|
|
|
android:paddingRight="@{viewModel.insets.right}"
|
|
|
|
android:paddingBottom="@{viewModel.insets.bottom}"
|
|
|
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
|
|
tools:listitem="@layout/item_console_md2" />
|
|
|
|
|
|
|
|
</HorizontalScrollView>
|
|
|
|
|
|
|
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
|
|
|
gone="@{!viewModel.loaded || !viewModel.canShowReboot}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="bottom|end"
|
|
|
|
android:layout_margin="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@{(int) @dimen/l1 + viewModel.insets.bottom}"
|
|
|
|
android:onClick="@{() -> viewModel.restartPressed()}"
|
|
|
|
android:text="@string/reboot"
|
|
|
|
android:textAllCaps="false"
|
|
|
|
android:textColor="?colorOnPrimary"
|
|
|
|
android:textStyle="bold"
|
|
|
|
app:backgroundTint="?colorPrimary"
|
|
|
|
app:icon="@drawable/ic_restart"
|
|
|
|
app:iconTint="?colorOnPrimary" />
|
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
style="@style/WidgetFoundation.Card.Elevated"
|
|
|
|
goneUnless="@{viewModel.loading}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
app:contentPadding="@dimen/l1">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
movieBehavior="@{viewModel.loading}"
|
|
|
|
movieBehaviorText="@{viewModel.behaviorText}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:fontFamily="monospace"
|
|
|
|
android:gravity="center"
|
|
|
|
android:textAppearance="@style/AppearanceFoundation.Body"
|
|
|
|
android:textColor="?colorOnSurface"
|
|
|
|
android:textStyle="bold"
|
|
|
|
tools:text="Flashing..." />
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
2019-10-17 18:57:00 +02:00
|
|
|
|
2020-01-13 00:43:09 +08:00
|
|
|
</layout>
|