2017-07-17 16:59:22 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-04-24 18:28:41 +00: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">
|
2017-07-17 16:59:22 +00:00
|
|
|
|
2019-04-24 18:28:41 +00:00
|
|
|
<data>
|
2017-07-17 16:59:22 +00:00
|
|
|
|
2019-04-24 18:28:41 +00:00
|
|
|
<variable
|
|
|
|
name="viewModel"
|
|
|
|
type="com.topjohnwu.magisk.ui.flash.FlashViewModel" />
|
|
|
|
|
|
|
|
</data>
|
|
|
|
|
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
2017-07-17 16:59:22 +00:00
|
|
|
android:layout_width="match_parent"
|
2019-04-24 18:28:41 +00:00
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:theme="@style/AppBarLayoutTheme.Flashing">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.Toolbar
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="?attr/actionBarSize"
|
|
|
|
app:contentInsetLeft="0dp"
|
|
|
|
app:contentInsetStart="0dp"
|
|
|
|
app:popupTheme="@style/ToolbarPopupTheme.Flashing">
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:animateLayoutChanges="true">
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
invisibleScale="@{viewModel.loading}"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
|
|
android:onClick="@{() -> viewModel.backPressed()}"
|
|
|
|
app:layout_constraintDimensionRatio="1:1"
|
|
|
|
app:layout_constraintLeft_toLeftOf="parent">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
style="@style/Widget.Icon"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:background="@android:color/transparent"
|
|
|
|
app:srcCompat="@drawable/ic_back"
|
|
|
|
app:tint="@android:color/white" />
|
|
|
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
style="@style/Widget.Text.Emphasize"
|
|
|
|
movieBehavior="@{viewModel.loading}"
|
|
|
|
movieBehaviorText="@{viewModel.behaviorText}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:fontFamily="monospace"
|
|
|
|
android:textColor="@android:color/white"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
|
|
app:layout_constraintRight_toRightOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
tools:text="Flashing..." />
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
invisibleScale="@{viewModel.loading}"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
|
|
android:onClick="@{() -> viewModel.savePressed()}"
|
|
|
|
app:layout_constraintDimensionRatio="1:1"
|
|
|
|
app:layout_constraintRight_toRightOf="parent">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
style="@style/Widget.Icon"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:background="@android:color/transparent"
|
2019-05-02 13:14:35 +00:00
|
|
|
app:srcCompat="@drawable/ic_save_compat"
|
2019-04-24 18:28:41 +00:00
|
|
|
app:tint="@android:color/white" />
|
|
|
|
|
|
|
|
</FrameLayout>
|
2017-07-17 16:59:22 +00:00
|
|
|
|
2019-04-24 18:28:41 +00:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
</androidx.appcompat.widget.Toolbar>
|
|
|
|
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
2018-12-30 18:47:30 +00:00
|
|
|
android:layout_height="match_parent"
|
2019-04-24 18:28:41 +00:00
|
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
2017-07-17 16:59:22 +00:00
|
|
|
|
2019-04-24 18:28:41 +00:00
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
itemBinding="@{viewModel.itemBinding}"
|
|
|
|
items="@{viewModel.items}"
|
2019-05-02 14:23:20 +00:00
|
|
|
android:id="@+id/flash_content"
|
2019-04-24 18:28:41 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:orientation="vertical"
|
2019-05-02 14:23:20 +00:00
|
|
|
scrollToLast="@{true}"
|
2019-04-24 18:28:41 +00:00
|
|
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
|
|
tools:listitem="@layout/item_console" />
|
2017-07-17 16:59:22 +00:00
|
|
|
|
2019-04-24 18:28:41 +00:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
invisibleScale="@{!viewModel.loaded || !viewModel.canShowReboot}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_margin="@dimen/margin_generic"
|
|
|
|
app:cardBackgroundColor="@color/colorSecondary"
|
|
|
|
app:cardCornerRadius="26dp"
|
|
|
|
app:cardPreventCornerOverlap="true"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintRight_toRightOf="parent">
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:animateLayoutChanges="true"
|
|
|
|
android:background="?attr/selectableItemBackground"
|
|
|
|
android:gravity="center"
|
|
|
|
android:onClick="@{() -> viewModel.restartPressed()}"
|
|
|
|
android:padding="@dimen/margin_generic_half">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
style="@style/Widget.Icon"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:background="@android:color/transparent"
|
|
|
|
app:srcCompat="@drawable/ic_restart"
|
|
|
|
app:tint="@color/colorTextTinted" />
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
style="@style/Widget.Text.Emphasize.Tinted"
|
|
|
|
gone="@{!viewModel.showRestartTitle}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginLeft="@dimen/margin_generic_half"
|
|
|
|
android:paddingRight="@dimen/margin_generic_half"
|
|
|
|
android:text="@string/reboot" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
|
|
|
|
|
|
</layout>
|