Loading packages/SettingsLib/SettingsTheme/src/com/android/settingslib/widget/SettingsPreferenceGroupAdapter.kt +31 −33 Original line number Diff line number Diff line Loading @@ -127,17 +127,6 @@ open class SettingsPreferenceGroupAdapter(preferenceGroup: PreferenceGroup) : currentParent = pref } // ExpandablePreference is PreferenceGroup but it should handle round corner is Expandable -> { // When ExpandablePreference is expanded, we treat is as the first item. if (pref.isExpanded()) { currentParent = pref as? PreferenceGroup startIndex = i cornerStyles[i] = cornerStyles[i] or ROUND_CORNER_TOP or ROUND_CORNER_CENTER endIndex = -1 } } // SpacePreference should not have round corner background. is SpacePreference -> { cornerStyles[i] = 0 Loading @@ -145,6 +134,14 @@ open class SettingsPreferenceGroupAdapter(preferenceGroup: PreferenceGroup) : } else -> { // When ExpandablePreference is expanded, we treat is as the first item. if (pref is Expandable && pref.isExpanded()) { currentParent = pref as? PreferenceGroup startIndex = i cornerStyles[i] = cornerStyles[i] or ROUND_CORNER_TOP or ROUND_CORNER_CENTER endIndex = -1 } else { val parent = pref?.parent // item in the group should have round corner background. Loading Loading @@ -178,6 +175,7 @@ open class SettingsPreferenceGroupAdapter(preferenceGroup: PreferenceGroup) : } } } } /** handle roundCorner background */ private fun updateBackground(holder: PreferenceViewHolder, position: Int) { Loading Loading
packages/SettingsLib/SettingsTheme/src/com/android/settingslib/widget/SettingsPreferenceGroupAdapter.kt +31 −33 Original line number Diff line number Diff line Loading @@ -127,17 +127,6 @@ open class SettingsPreferenceGroupAdapter(preferenceGroup: PreferenceGroup) : currentParent = pref } // ExpandablePreference is PreferenceGroup but it should handle round corner is Expandable -> { // When ExpandablePreference is expanded, we treat is as the first item. if (pref.isExpanded()) { currentParent = pref as? PreferenceGroup startIndex = i cornerStyles[i] = cornerStyles[i] or ROUND_CORNER_TOP or ROUND_CORNER_CENTER endIndex = -1 } } // SpacePreference should not have round corner background. is SpacePreference -> { cornerStyles[i] = 0 Loading @@ -145,6 +134,14 @@ open class SettingsPreferenceGroupAdapter(preferenceGroup: PreferenceGroup) : } else -> { // When ExpandablePreference is expanded, we treat is as the first item. if (pref is Expandable && pref.isExpanded()) { currentParent = pref as? PreferenceGroup startIndex = i cornerStyles[i] = cornerStyles[i] or ROUND_CORNER_TOP or ROUND_CORNER_CENTER endIndex = -1 } else { val parent = pref?.parent // item in the group should have round corner background. Loading Loading @@ -178,6 +175,7 @@ open class SettingsPreferenceGroupAdapter(preferenceGroup: PreferenceGroup) : } } } } /** handle roundCorner background */ private fun updateBackground(holder: PreferenceViewHolder, position: Int) { Loading