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 @@