Added uninstall button to magisk details

This commit is contained in:
Viktor De Pasquale 2020-02-01 13:56:56 +01:00 committed by John Wu
parent c18db555a4
commit c35d020731
2 changed files with 37 additions and 12 deletions

View File

@ -17,7 +17,7 @@
android:clipToPadding="false"
android:fillViewport="true"
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l2}"
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l3}"
tools:layout_marginTop="24dp">
<LinearLayout
@ -145,17 +145,6 @@
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.button.MaterialButton
style="@style/WidgetFoundation.Button.Error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l1"
android:layout_marginEnd="@dimen/l1"
android:onClick="@{() -> viewModel.onDeletePressed()}"
android:text="@string/uninstall"
android:textAllCaps="false"
app:icon="@drawable/ic_delete_md2" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -300,6 +300,42 @@
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
style="@style/W.Home.Card"
gone="@{Info.env.magiskVersionCode &lt; 0}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:onClick="@{() -> viewModel.onDeletePressed()}">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingStart="@dimen/l1"
android:paddingTop="@dimen/l_50"
android:paddingEnd="@dimen/l1"
android:paddingBottom="@dimen/l_50">
<androidx.appcompat.widget.AppCompatImageView
style="@style/WidgetFoundation.Icon.Error"
android:background="@null"
app:srcCompat="@drawable/ic_delete_md2" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/uninstall"
android:textAppearance="@style/AppearanceFoundation.Caption"
android:textColor="?colorError"
android:textStyle="bold" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</HorizontalScrollView>