From af3208e2c321905c04aea593a6ed3064908b37ef Mon Sep 17 00:00:00 2001 From: Maurice Lam Date: Mon, 8 May 2017 11:26:22 -0700 Subject: [PATCH] Add footer stubs to blank template Test: ./gradlew test Bug: 38043070 Change-Id: I91aae8667f1eef37f8c3cccb879871afefb90823 --- .../layout/suw_glif_blank_template_card.xml | 7 ++-- .../suw_glif_blank_template_compact.xml | 5 +-- .../suw_glif_blank_template_content.xml | 35 +++++++++++++++++++ .../setupwizardlib/GlifLayoutTest.java | 15 ++++++++ 4 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 library/main/res/layout/suw_glif_blank_template_content.xml diff --git a/library/main/res/layout/suw_glif_blank_template_card.xml b/library/main/res/layout/suw_glif_blank_template_card.xml index d120ab0..67c4280 100644 --- a/library/main/res/layout/suw_glif_blank_template_card.xml +++ b/library/main/res/layout/suw_glif_blank_template_card.xml @@ -31,11 +31,14 @@ android:visibility="invisible" /> + android:height="@dimen/suw_glif_card_height"> + + + + - + diff --git a/library/main/res/layout/suw_glif_blank_template_content.xml b/library/main/res/layout/suw_glif_blank_template_content.xml new file mode 100644 index 0000000..ed81126 --- /dev/null +++ b/library/main/res/layout/suw_glif_blank_template_content.xml @@ -0,0 +1,35 @@ + + + + + + + + + + diff --git a/library/test/robotest/src/com/android/setupwizardlib/GlifLayoutTest.java b/library/test/robotest/src/com/android/setupwizardlib/GlifLayoutTest.java index 8734f1d..d46409d 100644 --- a/library/test/robotest/src/com/android/setupwizardlib/GlifLayoutTest.java +++ b/library/test/robotest/src/com/android/setupwizardlib/GlifLayoutTest.java @@ -240,6 +240,21 @@ public class GlifLayoutTest { testInflateFooter(); } + @Test + public void testInflateFooterBlankTemplate() { + GlifLayout layout = new GlifLayout(mContext, R.layout.suw_glif_blank_template); + + final View view = layout.inflateFooter(android.R.layout.simple_list_item_1); + assertEquals(android.R.id.text1, view.getId()); + assertNotNull(layout.findViewById(android.R.id.text1)); + } + + @Config(qualifiers = "sw600dp") + @Test + public void testInflateFooterBlankTemplateTablet() { + testInflateFooterBlankTemplate(); + } + @Test public void testFooterXml() { GlifLayout layout = new GlifLayout(