Loading res/layout/dark_mode_section_view.xml +1 −2 Original line number Diff line number Diff line Loading @@ -33,14 +33,13 @@ android:text="@string/mode_title" style="@style/SectionTitleTextStyle" /> <com.google.android.material.materialswitch.MaterialSwitch <Switch android:id="@+id/dark_mode_toggle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:clickable="false" android:focusable="false" android:theme="@style/Theme.Material3.DynamicColors.DayNight" android:minHeight="0dp" android:text="" android:textOn="" Loading res/layout/notification_section.xml +1 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ android:paddingEnd="@dimen/notification_section_title_padding" style="@style/SectionTitleTextStyle"/> <com.google.android.material.materialswitch.MaterialSwitch <Switch android:id="@+id/switcher" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading @@ -43,7 +43,6 @@ android:background="@null" android:focusable="false" android:clickable="false" android:theme="@style/Theme.Material3.DynamicColors.DayNight" android:text="" android:textOn="" android:textOff="" /> Loading res/layout/themed_icon_section_view.xml +1 −2 Original line number Diff line number Diff line Loading @@ -39,14 +39,13 @@ android:text="@string/themed_icon_title" style="@style/SectionTitleTextStyle" /> <com.google.android.material.materialswitch.MaterialSwitch <Switch android:id="@+id/themed_icon_toggle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:clickable="false" android:focusable="false" android:theme="@style/Theme.Material3.DynamicColors.DayNight" android:minHeight="0dp" android:text="" android:textOn="" Loading src/com/android/customization/model/mode/DarkModeSectionController.java +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.os.Looper; import android.os.PowerManager; import android.text.TextUtils; import android.view.LayoutInflater; import android.widget.Switch; import android.widget.Toast; import androidx.annotation.MainThread; Loading @@ -42,7 +43,6 @@ import com.android.customization.module.logging.ThemesUserEventLogger; import com.android.customization.picker.mode.DarkModeSectionView; import com.android.themepicker.R; import com.android.wallpaper.model.CustomizationSectionController; import com.google.android.material.materialswitch.MaterialSwitch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; Loading Loading @@ -127,7 +127,7 @@ public class DarkModeSectionController implements if (context == null) { return; } MaterialSwitch switchView = mDarkModeSectionView.findViewById(R.id.dark_mode_toggle); Switch switchView = mDarkModeSectionView.findViewById(R.id.dark_mode_toggle); if (!switchView.isEnabled()) { Toast disableToast = Toast.makeText(mContext, mContext.getString(R.string.mode_disabled_msg), Toast.LENGTH_SHORT); Loading src/com/android/customization/picker/mode/DarkModeSectionView.java +2 −2 Original line number Diff line number Diff line Loading @@ -17,13 +17,13 @@ package com.android.customization.picker.mode; import android.content.Context; import android.content.res.Configuration; import android.widget.Switch; import android.util.AttributeSet; import androidx.annotation.Nullable; import com.android.themepicker.R; import com.android.wallpaper.picker.SectionView; import com.google.android.material.materialswitch.MaterialSwitch; /** The view of section in the customization picker fragment. */ public final class DarkModeSectionView extends SectionView { Loading @@ -40,7 +40,7 @@ public final class DarkModeSectionView extends SectionView { @Override protected void onFinishInflate() { super.onFinishInflate(); MaterialSwitch switchView = findViewById(R.id.dark_mode_toggle); Switch switchView = findViewById(R.id.dark_mode_toggle); switchView.setChecked(mIsDarkModeActivated); switchView.setOnCheckedChangeListener((buttonView, isChecked) -> switchView.setChecked(mIsDarkModeActivated) Loading Loading
res/layout/dark_mode_section_view.xml +1 −2 Original line number Diff line number Diff line Loading @@ -33,14 +33,13 @@ android:text="@string/mode_title" style="@style/SectionTitleTextStyle" /> <com.google.android.material.materialswitch.MaterialSwitch <Switch android:id="@+id/dark_mode_toggle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:clickable="false" android:focusable="false" android:theme="@style/Theme.Material3.DynamicColors.DayNight" android:minHeight="0dp" android:text="" android:textOn="" Loading
res/layout/notification_section.xml +1 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ android:paddingEnd="@dimen/notification_section_title_padding" style="@style/SectionTitleTextStyle"/> <com.google.android.material.materialswitch.MaterialSwitch <Switch android:id="@+id/switcher" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading @@ -43,7 +43,6 @@ android:background="@null" android:focusable="false" android:clickable="false" android:theme="@style/Theme.Material3.DynamicColors.DayNight" android:text="" android:textOn="" android:textOff="" /> Loading
res/layout/themed_icon_section_view.xml +1 −2 Original line number Diff line number Diff line Loading @@ -39,14 +39,13 @@ android:text="@string/themed_icon_title" style="@style/SectionTitleTextStyle" /> <com.google.android.material.materialswitch.MaterialSwitch <Switch android:id="@+id/themed_icon_toggle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:clickable="false" android:focusable="false" android:theme="@style/Theme.Material3.DynamicColors.DayNight" android:minHeight="0dp" android:text="" android:textOn="" Loading
src/com/android/customization/model/mode/DarkModeSectionController.java +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.os.Looper; import android.os.PowerManager; import android.text.TextUtils; import android.view.LayoutInflater; import android.widget.Switch; import android.widget.Toast; import androidx.annotation.MainThread; Loading @@ -42,7 +43,6 @@ import com.android.customization.module.logging.ThemesUserEventLogger; import com.android.customization.picker.mode.DarkModeSectionView; import com.android.themepicker.R; import com.android.wallpaper.model.CustomizationSectionController; import com.google.android.material.materialswitch.MaterialSwitch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; Loading Loading @@ -127,7 +127,7 @@ public class DarkModeSectionController implements if (context == null) { return; } MaterialSwitch switchView = mDarkModeSectionView.findViewById(R.id.dark_mode_toggle); Switch switchView = mDarkModeSectionView.findViewById(R.id.dark_mode_toggle); if (!switchView.isEnabled()) { Toast disableToast = Toast.makeText(mContext, mContext.getString(R.string.mode_disabled_msg), Toast.LENGTH_SHORT); Loading
src/com/android/customization/picker/mode/DarkModeSectionView.java +2 −2 Original line number Diff line number Diff line Loading @@ -17,13 +17,13 @@ package com.android.customization.picker.mode; import android.content.Context; import android.content.res.Configuration; import android.widget.Switch; import android.util.AttributeSet; import androidx.annotation.Nullable; import com.android.themepicker.R; import com.android.wallpaper.picker.SectionView; import com.google.android.material.materialswitch.MaterialSwitch; /** The view of section in the customization picker fragment. */ public final class DarkModeSectionView extends SectionView { Loading @@ -40,7 +40,7 @@ public final class DarkModeSectionView extends SectionView { @Override protected void onFinishInflate() { super.onFinishInflate(); MaterialSwitch switchView = findViewById(R.id.dark_mode_toggle); Switch switchView = findViewById(R.id.dark_mode_toggle); switchView.setChecked(mIsDarkModeActivated); switchView.setOnCheckedChangeListener((buttonView, isChecked) -> switchView.setChecked(mIsDarkModeActivated) Loading