Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e67e9465 authored by Yi-an Chen's avatar Yi-an Chen
Browse files

Fix preference grouping in SettingsPreferenceGroupAdapter

When expand button is not expanded (when it's not expanded, its
getOrder() will return 999), we should treat this as a part of the
previous group and should not start a new group when calculating the
round corner.

Bug: 418260806
Test: Manual
Flag: EXEMPT bugfix
Change-Id: Ic7d7002a1913ddd2c04494e3817c094b00a15d23
parent 908799c4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -146,7 +146,9 @@ open class SettingsPreferenceGroupAdapter(preferenceGroup: PreferenceGroup) :

                        // item in the group should have round corner background.
                        cornerStyles[i] = cornerStyles[i] or ROUND_CORNER_CENTER
                        if (parent === currentParent) {
                        // We should treat the ExpandButton as a part of the previous group
                        // despite that it doesn't have a parent.
                        if (parent === currentParent || parent == null) {
                            // find the first item in the group
                            if (startIndex == -1) {
                                startIndex = i