Fix switch text position when thumb is null

Change-Id: I05a107423fabf5a538258cf0562e0916c8be18b6
This commit is contained in:
Alan Viverette
2014-07-12 00:26:36 -07:00
parent 77cbcb6637
commit dec17299fe

View File

@@ -936,7 +936,7 @@ public class Switch extends CompoundButton {
final Rect bounds = thumbDrawable.getBounds();
cX = bounds.left + bounds.right;
} else {
cX = getWidth() / 2;
cX = getWidth();
}
final int left = cX / 2 - switchText.getWidth() / 2;