From a65273f3bdf0527b101e51b6c5fba0ff51585831 Mon Sep 17 00:00:00 2001 From: Maurice Lam Date: Thu, 10 May 2018 13:51:26 -0700 Subject: [PATCH] Fix SwitchItem clip Test: ./gradlew test Bug: 79175394 Change-Id: I3b0824e770b4c0470fc949d0d58f63dec54d7e12 (cherry picked from commit 2c20d03bbd0cb0ad835853f93a00cd509e982836) --- library/gingerbread/res/layout/suw_items_switch.xml | 1 + .../setupwizardlib/items/SwitchItemTest.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/library/gingerbread/res/layout/suw_items_switch.xml b/library/gingerbread/res/layout/suw_items_switch.xml index 3f101d7..319d7f7 100644 --- a/library/gingerbread/res/layout/suw_items_switch.xml +++ b/library/gingerbread/res/layout/suw_items_switch.xml @@ -20,6 +20,7 @@ style="@style/SuwItemContainer.Verbose" android:layout_width="match_parent" android:layout_height="wrap_content" + android:clipToPadding="false" android:orientation="horizontal"> = VERSION_CODES.LOLLIPOP); + SwitchItem item = new SwitchItem(); + LayoutInflater inflater = LayoutInflater.from(application); + ViewGroup layout = (ViewGroup) inflater.inflate(item.getDefaultLayoutResource(), null); + assertThat(layout.getClipToPadding()).isFalse(); + } + @Test public void testChecked() { SwitchItem item = new SwitchItem();