Fix switch text position when thumb is null
Change-Id: I05a107423fabf5a538258cf0562e0916c8be18b6
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user