From 1bb613ed5ab40eea70e906248301db0308a19b7f Mon Sep 17 00:00:00 2001
From: Adam Kasprzycki <66315787+santoni0@users.noreply.github.com>
Date: Fri, 28 Oct 2022 22:32:00 +0200
Subject: [PATCH] Replace MaterialComponents with Material3
---
.../edziennik/ext/DialogExtensions.kt | 4 ++--
.../dialogs/settings/ProfileConfigDialog.kt | 2 +-
.../ui/settings/SettingsLicenseActivity.kt | 4 ++--
.../res/layout/activity_build_invalid.xml | 2 +-
.../res/layout/attendance_details_dialog.xml | 2 +-
app/src/main/res/layout/card_home_archive.xml | 2 +-
.../res/layout/card_home_availability.xml | 4 ++--
app/src/main/res/layout/card_home_debug.xml | 19 +++++++++++++------
app/src/main/res/layout/card_home_notes.xml | 2 +-
.../main/res/layout/card_home_timetable.xml | 2 +-
.../layout/dialog_bell_sync_time_choose.xml | 2 +-
.../main/res/layout/dialog_config_agenda.xml | 2 +-
.../main/res/layout/dialog_config_grades.xml | 2 +-
app/src/main/res/layout/dialog_day.xml | 2 +-
app/src/main/res/layout/dialog_edit_text.xml | 2 +-
.../main/res/layout/dialog_event_details.xml | 12 ++++++------
.../res/layout/dialog_event_manual_v2.xml | 16 +++++++---------
.../main/res/layout/dialog_grade_details.xml | 4 ++--
.../main/res/layout/dialog_lesson_details.xml | 6 +++---
.../main/res/layout/dialog_profile_config.xml | 4 ++--
.../layout/dialog_register_unavailable.xml | 2 +-
app/src/main/res/layout/event_list_item.xml | 2 +-
app/src/main/res/layout/fragment_debug.xml | 10 +++++-----
app/src/main/res/layout/fragment_feedback.xml | 8 ++++----
app/src/main/res/layout/fragment_home.xml | 2 +-
.../main/res/layout/fragment_timetable_v2.xml | 5 ++---
app/src/main/res/layout/grades_item_stats.xml | 2 +-
app/src/main/res/layout/lab_fragment.xml | 4 ++--
.../res/layout/login_chooser_fragment.xml | 4 ++--
.../main/res/layout/login_form_field_item.xml | 2 +-
.../main/res/layout/login_form_fragment.xml | 2 +-
.../main/res/layout/login_form_item_qr.xml | 2 +-
.../layout/login_platform_list_fragment.xml | 6 +++---
.../res/layout/login_summary_fragment.xml | 2 +-
app/src/main/res/layout/message_fragment.xml | 10 +++++-----
.../res/layout/messages_compose_fragment.xml | 10 +++++-----
.../res/layout/messages_config_dialog.xml | 2 +-
.../main/res/layout/note_editor_dialog.xml | 6 +++---
app/src/main/res/layout/note_list_item.xml | 2 +-
app/src/main/res/layout/search_item.xml | 2 +-
.../main/res/layout/styled_text_buttons.xml | 14 +++++++-------
.../main/res/layout/styled_text_dialog.xml | 2 +-
.../res/layout/template_page_fragment.xml | 2 +-
app/src/main/res/layout/web_push_fragment.xml | 2 +-
app/src/main/res/values/styles.xml | 4 ++--
45 files changed, 104 insertions(+), 100 deletions(-)
diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ext/DialogExtensions.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ext/DialogExtensions.kt
index 61de4f77..ede40393 100644
--- a/app/src/main/java/pl/szczodrzynski/edziennik/ext/DialogExtensions.kt
+++ b/app/src/main/java/pl/szczodrzynski/edziennik/ext/DialogExtensions.kt
@@ -83,13 +83,13 @@ fun AlertDialog.overlayBackgroundColor(color: Int, alpha: Int) {
val backgroundInsets = MaterialDialogs.getDialogBackgroundInsets(
context,
R.attr.alertDialogStyle,
- R.style.MaterialAlertDialog_MaterialComponents,
+ R.style.MaterialAlertDialog_Material3,
)
val background = MaterialShapeDrawable(
context,
null,
R.attr.alertDialogStyle,
- R.style.MaterialAlertDialog_MaterialComponents
+ R.style.MaterialAlertDialog_Material3
)
with(background) {
initializeElevationOverlay(context)
diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/settings/ProfileConfigDialog.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/settings/ProfileConfigDialog.kt
index 7ded038d..daeb5926 100644
--- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/settings/ProfileConfigDialog.kt
+++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/settings/ProfileConfigDialog.kt
@@ -46,7 +46,7 @@ class ProfileConfigDialog(
activity,
null,
R.attr.alertDialogStyle,
- R.style.MaterialAlertDialog_MaterialComponents
+ R.style.MaterialAlertDialog_Material3
)
val surface = MaterialColors.getColor(activity, R.attr.colorSurface, TAG)
shape.setCornerSize(18.dp.toFloat())
diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/settings/SettingsLicenseActivity.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/settings/SettingsLicenseActivity.kt
index 5a4a5e9b..f86fe807 100644
--- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/settings/SettingsLicenseActivity.kt
+++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/settings/SettingsLicenseActivity.kt
@@ -32,9 +32,9 @@ class SettingsLicenseActivity : MaterialAboutActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(
if (Themes.isDark)
- R.style.Theme_MaterialComponents
+ R.style.Theme_Material3_Dark
else
- R.style.Theme_MaterialComponents_Light
+ R.style.Theme_Material3_Light
)
foregroundColor = if (Themes.isDark)
R.color.primaryTextDark.resolveColor(this)
diff --git a/app/src/main/res/layout/activity_build_invalid.xml b/app/src/main/res/layout/activity_build_invalid.xml
index 0bc5fd85..1cf265ad 100644
--- a/app/src/main/res/layout/activity_build_invalid.xml
+++ b/app/src/main/res/layout/activity_build_invalid.xml
@@ -55,7 +55,7 @@
diff --git a/app/src/main/res/layout/card_home_availability.xml b/app/src/main/res/layout/card_home_availability.xml
index 9b4f67f5..45b5b52c 100644
--- a/app/src/main/res/layout/card_home_availability.xml
+++ b/app/src/main/res/layout/card_home_availability.xml
@@ -41,14 +41,14 @@
diff --git a/app/src/main/res/layout/card_home_debug.xml b/app/src/main/res/layout/card_home_debug.xml
index 4bcca808..70a05c44 100644
--- a/app/src/main/res/layout/card_home_debug.xml
+++ b/app/src/main/res/layout/card_home_debug.xml
@@ -20,14 +20,21 @@
+
+
@@ -40,7 +47,7 @@
@@ -53,14 +60,14 @@
@@ -73,7 +80,7 @@
diff --git a/app/src/main/res/layout/card_home_notes.xml b/app/src/main/res/layout/card_home_notes.xml
index da14da63..76d2a5cd 100644
--- a/app/src/main/res/layout/card_home_notes.xml
+++ b/app/src/main/res/layout/card_home_notes.xml
@@ -38,7 +38,7 @@
diff --git a/app/src/main/res/layout/card_home_timetable.xml b/app/src/main/res/layout/card_home_timetable.xml
index 9b210f7b..d07e4fc3 100644
--- a/app/src/main/res/layout/card_home_timetable.xml
+++ b/app/src/main/res/layout/card_home_timetable.xml
@@ -47,7 +47,7 @@
diff --git a/app/src/main/res/layout/dialog_bell_sync_time_choose.xml b/app/src/main/res/layout/dialog_bell_sync_time_choose.xml
index 0859f5a7..7474d56c 100644
--- a/app/src/main/res/layout/dialog_bell_sync_time_choose.xml
+++ b/app/src/main/res/layout/dialog_bell_sync_time_choose.xml
@@ -26,7 +26,7 @@
tools:text="@string/bell_sync_choose_howto" />
diff --git a/app/src/main/res/layout/dialog_config_agenda.xml b/app/src/main/res/layout/dialog_config_agenda.xml
index effe23fe..5adc8930 100644
--- a/app/src/main/res/layout/dialog_config_agenda.xml
+++ b/app/src/main/res/layout/dialog_config_agenda.xml
@@ -144,7 +144,7 @@
diff --git a/app/src/main/res/layout/dialog_day.xml b/app/src/main/res/layout/dialog_day.xml
index 9fd14e1e..ede43ffb 100644
--- a/app/src/main/res/layout/dialog_day.xml
+++ b/app/src/main/res/layout/dialog_day.xml
@@ -121,7 +121,7 @@
diff --git a/app/src/main/res/layout/dialog_event_details.xml b/app/src/main/res/layout/dialog_event_details.xml
index b954ce11..f44f289c 100644
--- a/app/src/main/res/layout/dialog_event_details.xml
+++ b/app/src/main/res/layout/dialog_event_details.xml
@@ -222,7 +222,7 @@
@@ -35,8 +35,7 @@
@@ -347,7 +347,7 @@
@@ -401,7 +401,7 @@
@@ -102,7 +102,7 @@
@@ -43,7 +43,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
- style="@style/Widget.MaterialComponents.Button"
+ style="@style/Widget.Material3.Button"
android:text="Run"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintStart_toStartOf="parent"
@@ -61,7 +61,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
- style="@style/Widget.MaterialComponents.Button"
+ style="@style/Widget.Material3.Button"
android:text="AppConfig"
app:layout_constraintEnd_toStartOf="@+id/guideline3"
app:layout_constraintStart_toStartOf="@+id/guideline2"
@@ -79,7 +79,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
- style="@style/Widget.MaterialComponents.Button"
+ style="@style/Widget.Material3.Button"
android:text="AppProfile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline3"
diff --git a/app/src/main/res/layout/fragment_feedback.xml b/app/src/main/res/layout/fragment_feedback.xml
index 79d1466d..718fc919 100644
--- a/app/src/main/res/layout/fragment_feedback.xml
+++ b/app/src/main/res/layout/fragment_feedback.xml
@@ -8,7 +8,7 @@
+ android:layout_height="wrap_content">
@@ -178,7 +178,7 @@