various refactoring
fixes #7 - tweak proguard-rules.pro to try to fix a bug - modernize update activity Signed-off-by: androidacy-user <opensource@androidacy.com>pull/27/head
parent
fbb6ecd40c
commit
a0c0d86f78
@ -0,0 +1,3 @@
|
||||
package com.fox2code.mmm
|
||||
|
||||
internal interface NotificationTypeCst
|
@ -1,122 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".UpdateActivity">
|
||||
|
||||
<!-- Activity used to download and install app updates -->
|
||||
<!-- first, upgrade icon -->
|
||||
<ImageView
|
||||
android:id="@+id/update_icon"
|
||||
android:layout_width="101dp"
|
||||
android:layout_height="93dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="8dp"
|
||||
android:contentDescription="@string/crash_icon"
|
||||
android:src="@drawable/baseline_system_update_24" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/update_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/update_title"
|
||||
android:textAppearance="?attr/textAppearanceHeadline6" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/update_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/update_message"
|
||||
android:textAppearance="?attr/textAppearanceBody2" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/update_progress"
|
||||
style="@style/Widget.Material3.LinearProgressIndicator"
|
||||
<LinearLayout
|
||||
android:id="@+id/update_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/update_progress_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textAppearance="?attr/textAppearanceBody2" />
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="4dp"
|
||||
android:orientation="horizontal">
|
||||
<!-- Activity used to download and install app updates -->
|
||||
<!-- first, upgrade icon -->
|
||||
<ImageView
|
||||
android:id="@+id/update_icon"
|
||||
android:layout_width="101dp"
|
||||
android:layout_height="93dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="8dp"
|
||||
android:contentDescription="@string/update"
|
||||
android:src="@drawable/baseline_system_update_24" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/update_button"
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/update_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/update_button"
|
||||
android:visibility="invisible" />
|
||||
android:text="@string/update_title"
|
||||
android:textAppearance="?attr/textAppearanceHeadline6" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/update_cancel_button"
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/update_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/update_cancel_button"
|
||||
android:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Invisible warning for debug builds -->
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/update_debug_warning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/update_debug_warning"
|
||||
android:textAppearance="?attr/textAppearanceBody2"
|
||||
android:visibility="gone" />
|
||||
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/update_message"
|
||||
android:textAppearance="?attr/textAppearanceBody2" />
|
||||
|
||||
<!-- Changelog view -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/update_progress"
|
||||
style="@style/Widget.Material3.LinearProgressIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/changelog_title"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/update_progress_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/changelog"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:textAppearance="?attr/textAppearanceBody2" />
|
||||
|
||||
<!-- Invisible warning for debug builds -->
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/update_changelog"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/update_debug_warning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:scrollbars="vertical"
|
||||
android:text="@string/changelog_none"
|
||||
android:textAppearance="?attr/textAppearanceBody2" />
|
||||
android:text="@string/update_debug_warning"
|
||||
android:textAppearance="?attr/textAppearanceBody2"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
<!-- Changelog view -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/changelog_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/changelog"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/update_changelog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:scrollbars="vertical"
|
||||
android:text="@string/changelog_none"
|
||||
android:textAppearance="?attr/textAppearanceBody2" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<!-- bottom nav for cancel and finish -->
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/bottom_navigation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="0dp"
|
||||
android:visibility="visible"
|
||||
app:compatShadowEnabled="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/update_container"
|
||||
app:menu="@menu/update_nav" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout >
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/update_cancel_button"
|
||||
android:icon="@drawable/baseline_close_24"
|
||||
android:title="@string/cancel"
|
||||
android:visible="true"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_update"
|
||||
android:icon="@drawable/ic_baseline_refresh_24"
|
||||
android:title="@string/update_button"
|
||||
android:visible="true"
|
||||
android:enabled="false"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
Loading…
Reference in New Issue