Update MainSwitch widget.

- Fix the MainSwitchBar overlapping issue.
- Add setTitle method to support string resource id.
- Add setChecked method to fix the state of switch not sync issue.
- Get the resource id of title from xml.

Fix: 178425979
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: I332b017c6a6e32e5ea3929d4b3c7e81104445bcc
3 files changed