From acabdbd55df0b81f29f64dbc80feecdb17315df0 Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Thu, 17 Oct 2024 15:22:42 +0530 Subject: [PATCH] Theme components to match our palette --- res/drawable/clock_color_size_button_background_base.xml | 2 +- res/drawable/option_border.xml | 2 +- res/layout/dark_mode_section_view.xml | 3 +-- res/layout/notification_section.xml | 3 +-- res/layout/themed_icon_section_view.xml | 3 +-- .../customization/model/mode/DarkModeSectionController.java | 4 ++-- .../customization/picker/mode/DarkModeSectionView.java | 4 ++-- .../notifications/ui/binder/NotificationSectionBinder.kt | 4 ++-- .../picker/themedicon/ThemedIconSectionView.java | 6 +++--- 9 files changed, 14 insertions(+), 17 deletions(-) diff --git a/res/drawable/clock_color_size_button_background_base.xml b/res/drawable/clock_color_size_button_background_base.xml index 2e6f2be5e..e29b9f2a0 100644 --- a/res/drawable/clock_color_size_button_background_base.xml +++ b/res/drawable/clock_color_size_button_background_base.xml @@ -17,5 +17,5 @@ - + \ No newline at end of file diff --git a/res/drawable/option_border.xml b/res/drawable/option_border.xml index d0fde5cab..fce166633 100644 --- a/res/drawable/option_border.xml +++ b/res/drawable/option_border.xml @@ -23,7 +23,7 @@ - + diff --git a/res/layout/dark_mode_section_view.xml b/res/layout/dark_mode_section_view.xml index 7eae574aa..be7385dd2 100644 --- a/res/layout/dark_mode_section_view.xml +++ b/res/layout/dark_mode_section_view.xml @@ -33,14 +33,13 @@ android:text="@string/mode_title" style="@style/SectionTitleTextStyle" /> - - diff --git a/res/layout/themed_icon_section_view.xml b/res/layout/themed_icon_section_view.xml index 715423356..26d742d41 100644 --- a/res/layout/themed_icon_section_view.xml +++ b/res/layout/themed_icon_section_view.xml @@ -39,14 +39,13 @@ android:text="@string/themed_icon_title" style="@style/SectionTitleTextStyle" /> - switchView.setChecked(mIsDarkModeActivated) diff --git a/src/com/android/customization/picker/notifications/ui/binder/NotificationSectionBinder.kt b/src/com/android/customization/picker/notifications/ui/binder/NotificationSectionBinder.kt index fe1ec330d..7b81f00f3 100644 --- a/src/com/android/customization/picker/notifications/ui/binder/NotificationSectionBinder.kt +++ b/src/com/android/customization/picker/notifications/ui/binder/NotificationSectionBinder.kt @@ -19,13 +19,13 @@ package com.android.customization.picker.notifications.ui.binder import android.annotation.SuppressLint import android.view.View +import android.widget.Switch; import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.lifecycleScope import androidx.lifecycle.repeatOnLifecycle import com.android.customization.picker.notifications.ui.viewmodel.NotificationSectionViewModel import com.android.themepicker.R -import com.google.android.material.materialswitch.MaterialSwitch import kotlinx.coroutines.launch /** @@ -38,7 +38,7 @@ object NotificationSectionBinder { viewModel: NotificationSectionViewModel, lifecycleOwner: LifecycleOwner, ) { - val switch: MaterialSwitch = view.requireViewById(R.id.switcher) + val switch: Switch = view.requireViewById(R.id.switcher) view.setOnClickListener { viewModel.onClicked() } diff --git a/src/com/android/customization/picker/themedicon/ThemedIconSectionView.java b/src/com/android/customization/picker/themedicon/ThemedIconSectionView.java index 5b379a9cf..2bbe74ee0 100644 --- a/src/com/android/customization/picker/themedicon/ThemedIconSectionView.java +++ b/src/com/android/customization/picker/themedicon/ThemedIconSectionView.java @@ -17,19 +17,19 @@ package com.android.customization.picker.themedicon; import android.content.Context; import android.util.AttributeSet; +import android.widget.Switch; import androidx.annotation.Nullable; import com.android.themepicker.R; import com.android.wallpaper.picker.SectionView; -import com.google.android.material.materialswitch.MaterialSwitch; /** * The {@link SectionView} for themed icon section view */ public class ThemedIconSectionView extends SectionView { - private MaterialSwitch mSwitchView; + private Switch mSwitchView; public ThemedIconSectionView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); @@ -49,7 +49,7 @@ public class ThemedIconSectionView extends SectionView { } /** Gets the switch view. */ - public MaterialSwitch getSwitch() { + public Switch getSwitch() { return mSwitchView; } } -- GitLab