Loading packages/SettingsLib/SegmentedButtonPreference/src/com/android/settingslib/widget/SegmentedButtonPreference.kt +9 −6 Original line number Diff line number Diff line Loading @@ -160,14 +160,17 @@ class SegmentedButtonPreference @JvmOverloads constructor( } private fun applyCheckIndex(index: Int) { buttonGroup?.getChildAt(index)?.let { button -> val button = buttonGroup?.getChildAt(index) ?: run { buttonGroup?.clearChecked() return } if (button.id == View.NO_ID || button.isGone) { buttonGroup?.clearChecked() return } buttonGroup?.check(button.id) } } private sealed interface SegmentedButtonIcon { data class DrawableIcon(val drawable: Drawable) : SegmentedButtonIcon Loading Loading
packages/SettingsLib/SegmentedButtonPreference/src/com/android/settingslib/widget/SegmentedButtonPreference.kt +9 −6 Original line number Diff line number Diff line Loading @@ -160,14 +160,17 @@ class SegmentedButtonPreference @JvmOverloads constructor( } private fun applyCheckIndex(index: Int) { buttonGroup?.getChildAt(index)?.let { button -> val button = buttonGroup?.getChildAt(index) ?: run { buttonGroup?.clearChecked() return } if (button.id == View.NO_ID || button.isGone) { buttonGroup?.clearChecked() return } buttonGroup?.check(button.id) } } private sealed interface SegmentedButtonIcon { data class DrawableIcon(val drawable: Drawable) : SegmentedButtonIcon Loading