diff options
| author | Alan Viverette <alanv@google.com> | 2014-07-12 00:26:36 -0700 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2014-07-12 00:26:36 -0700 |
| commit | dec17299fef93f673d8e8cab0ec0f734bf6b8539 (patch) | |
| tree | 64d2f05945bb8c69fe5f3a812ad268f1a58821bd /core/java/android/widget/Switch.java | |
| parent | 77cbcb6637e3733e9b80a93d37745f27ec4d4561 (diff) | |
Fix switch text position when thumb is null
Change-Id: I05a107423fabf5a538258cf0562e0916c8be18b6
Diffstat (limited to 'core/java/android/widget/Switch.java')
| -rw-r--r-- | core/java/android/widget/Switch.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java index 497cf108cc35..8ea1090e792b 100644 --- a/core/java/android/widget/Switch.java +++ b/core/java/android/widget/Switch.java @@ -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; |
