summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice Lam <yukl@google.com>2016-07-06 11:08:46 -0700
committerMaurice Lam <yukl@google.com>2016-07-06 11:34:10 -0700
commit453ab158fe4b4e285aa3338e75f67d4bed409250 (patch)
tree5b09a1cc283aa0d0e68029c151258b0fa9eaeefc
parenta84372fb0b62d0dbae55292c2d3d548caf5e40bb (diff)
downloadsetupwizard-453ab158fe4b4e285aa3338e75f67d4bed409250.tar.gz
[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
-rw-r--r--library/full-support/res/layout/suw_glif_recycler_template_content.xml21
-rw-r--r--library/main/res/layout/suw_glif_list_template_content.xml21
-rw-r--r--library/main/res/layout/suw_glif_template_content.xml41
3 files changed, 61 insertions, 22 deletions
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">
+
+ <include layout="@layout/suw_glif_header" />
+
+ <FrameLayout
+ android:id="@+id/suw_layout_content"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
- </LinearLayout>
+ </LinearLayout>
+
+ </ScrollView>
+
+ <ViewStub
+ android:id="@+id/suw_layout_footer"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
-</ScrollView>
+</LinearLayout>