[SuwLib] Add footer support for GlifLayout

Add a ViewStub for GlifLayout footers, so that clients can get the
ViewStub using findViewById, and then inflate it to any layout they
want.

Bug: 29992922
Change-Id: Iaa36cbf6aa55690f38f9d1f2d32ff0b435b26345
diff --git a/library/full-support/res/layout/suw_glif_recycler_template_content.xml b/library/full-support/res/layout/suw_glif_recycler_template_content.xml
index 10bf8c4..13da5db 100644
--- a/library/full-support/res/layout/suw_glif_recycler_template_content.xml
+++ b/library/full-support/res/layout/suw_glif_recycler_template_content.xml
@@ -15,11 +15,24 @@
     limitations under the License.
 -->
 
-<com.android.setupwizardlib.view.HeaderRecyclerView
+<LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/suw_recycler_view"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:scrollbars="vertical"
-    app:suwHeader="@layout/suw_glif_header" />
+    android:orientation="vertical">
+
+    <com.android.setupwizardlib.view.HeaderRecyclerView
+        android:id="@+id/suw_recycler_view"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:scrollbars="vertical"
+        app:suwHeader="@layout/suw_glif_header" />
+
+    <ViewStub
+        android:id="@+id/suw_layout_footer"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" />
+
+</LinearLayout>
diff --git a/library/main/res/layout/suw_glif_list_template_content.xml b/library/main/res/layout/suw_glif_list_template_content.xml
index 3756898..3793aeb 100644
--- a/library/main/res/layout/suw_glif_list_template_content.xml
+++ b/library/main/res/layout/suw_glif_list_template_content.xml
@@ -15,10 +15,23 @@
     limitations under the License.
 -->
 
-<com.android.setupwizardlib.view.StickyHeaderListView
+<LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@android:id/list"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    app:suwHeader="@layout/suw_glif_header" />
+    android:orientation="vertical">
+
+    <com.android.setupwizardlib.view.StickyHeaderListView
+        xmlns:app="http://schemas.android.com/apk/res-auto"
+        android:id="@android:id/list"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        app:suwHeader="@layout/suw_glif_header" />
+
+    <ViewStub
+        android:id="@+id/suw_layout_footer"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" />
+
+</LinearLayout>
diff --git a/library/main/res/layout/suw_glif_template_content.xml b/library/main/res/layout/suw_glif_template_content.xml
index b4a5287..0eda2ae 100644
--- a/library/main/res/layout/suw_glif_template_content.xml
+++ b/library/main/res/layout/suw_glif_template_content.xml
@@ -15,26 +15,39 @@
     limitations under the License.
 -->
 
-<ScrollView
+<LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/suw_scroll_view"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:fillViewport="true">
+    android:orientation="vertical">
 
-    <LinearLayout
+    <ScrollView
+        android:id="@+id/suw_scroll_view"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical">
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:fillViewport="true">
 
-        <include layout="@layout/suw_glif_header" />
-
-        <FrameLayout
-            android:id="@+id/suw_layout_content"
+        <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1" />
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
 
-    </LinearLayout>
+            <include layout="@layout/suw_glif_header" />
 
-</ScrollView>
+            <FrameLayout
+                android:id="@+id/suw_layout_content"
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1" />
+
+        </LinearLayout>
+
+    </ScrollView>
+
+    <ViewStub
+        android:id="@+id/suw_layout_footer"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" />
+
+</LinearLayout>