Fix the initial background color of MainSwitchBar

we should check Switch.isChecked() status first.

Bug: 207431726
Test: manual & robotest
Change-Id: Ie748a88f7b05fc1047590b9a08e89115bfa2d535
(cherry picked from commit 37c9982cb2)
This commit is contained in:
Edgar Wang
2021-12-08 17:36:20 +08:00
parent 9344483fe5
commit 13e996b4ef

View File

@@ -109,7 +109,7 @@ public class MainSwitchBar extends LinearLayout implements CompoundButton.OnChec
a.recycle();
}
setBackground(true);
setBackground(mSwitch.isChecked());
}
@Override