summaryrefslogtreecommitdiff
path: root/library/main/res
diff options
context:
space:
mode:
authorMaurice Lam <yukl@google.com>2018-01-02 20:45:07 -0800
committerMaurice Lam <yukl@google.com>2018-01-03 10:41:08 -0800
commit3a3d478a4b8805992f9558fa8128261970d2ee99 (patch)
treeee99a4f2df0366fee41495c8908452595e50ebae /library/main/res
parent5153bc0ae2fbe31e66a83cd014df0e7f7a7b436f (diff)
downloadsetupwizard-3a3d478a4b8805992f9558fa8128261970d2ee99.tar.gz
More app bar support in GlifLayout
- Add app:suwStickyHeader attribute to GlifLayout to specify a custom app bar layout, which can be a Toolbar. - Create indirection attribute ?attr/suwGlifIconStyle to allow apps to override the GLIF icon style. Test: ./gradlew test Bug: 68826871 Change-Id: I6384db970582c56431b6085bb172f6ca28099f9d
Diffstat (limited to 'library/main/res')
-rw-r--r--library/main/res/layout/suw_glif_blank_template_content.xml5
-rw-r--r--library/main/res/layout/suw_glif_header.xml2
-rw-r--r--library/main/res/layout/suw_glif_list_template_content.xml5
-rw-r--r--library/main/res/layout/suw_glif_template_content.xml5
-rw-r--r--library/main/res/values/attrs.xml4
5 files changed, 19 insertions, 2 deletions
diff --git a/library/main/res/layout/suw_glif_blank_template_content.xml b/library/main/res/layout/suw_glif_blank_template_content.xml
index ed81126..6d864cd 100644
--- a/library/main/res/layout/suw_glif_blank_template_content.xml
+++ b/library/main/res/layout/suw_glif_blank_template_content.xml
@@ -21,6 +21,11 @@
android:layout_height="match_parent"
android:orientation="vertical">
+ <ViewStub
+ android:id="@+id/suw_layout_sticky_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
<FrameLayout
android:id="@+id/suw_layout_content"
android:layout_width="match_parent"
diff --git a/library/main/res/layout/suw_glif_header.xml b/library/main/res/layout/suw_glif_header.xml
index cfabcb1..420e989 100644
--- a/library/main/res/layout/suw_glif_header.xml
+++ b/library/main/res/layout/suw_glif_header.xml
@@ -23,7 +23,7 @@
<ImageView
android:id="@+id/suw_layout_icon"
- style="@style/SuwGlifIcon"
+ style="?attr/suwGlifIconStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"
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 d0c5cc4..58ca178 100644
--- a/library/main/res/layout/suw_glif_list_template_content.xml
+++ b/library/main/res/layout/suw_glif_list_template_content.xml
@@ -22,6 +22,11 @@
android:layout_height="match_parent"
android:orientation="vertical">
+ <ViewStub
+ android:id="@+id/suw_layout_sticky_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
<!-- Ignore UnusedAttribute: scrollIndicators is new in M. Default to no indicators in older
versions. -->
<com.android.setupwizardlib.view.StickyHeaderListView
diff --git a/library/main/res/layout/suw_glif_template_content.xml b/library/main/res/layout/suw_glif_template_content.xml
index 0fe35a0..5226f63 100644
--- a/library/main/res/layout/suw_glif_template_content.xml
+++ b/library/main/res/layout/suw_glif_template_content.xml
@@ -22,6 +22,11 @@
android:layout_height="match_parent"
android:orientation="vertical">
+ <ViewStub
+ android:id="@+id/suw_layout_sticky_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
<!-- Ignore UnusedAttribute: scrollIndicators is new in M. Default to no indicators in older
versions. -->
<com.android.setupwizardlib.view.BottomScrollView
diff --git a/library/main/res/values/attrs.xml b/library/main/res/values/attrs.xml
index ffdf365..93e4da6 100644
--- a/library/main/res/values/attrs.xml
+++ b/library/main/res/values/attrs.xml
@@ -38,13 +38,14 @@
<!-- Push object to the end of its container, not changing its size. -->
<flag name="end" value="0x00800005" />
</attr>
+ <attr name="suwGlifIconStyle" format="reference" />
<attr name="suwCardBackground" format="color|reference" />
- <attr name="suwFillContentLayoutStyle" format="reference" />
<attr name="suwDividerCondition">
<enum name="either" value="0" />
<enum name="both" value="1" />
</attr>
+ <attr name="suwFillContentLayoutStyle" format="reference" />
<attr name="suwListItemIconColor" format="color" />
<attr name="suwNavBarBackgroundColor" format="color" />
<attr name="suwNavBarButtonBackground" format="color|reference" />
@@ -104,6 +105,7 @@
<attr name="suwColorPrimary" />
<attr name="suwFooter" format="reference" />
<attr name="suwLayoutFullscreen" format="boolean" />
+ <attr name="suwStickyHeader" format="reference" />
</declare-styleable>
<declare-styleable name="SuwStatusBarBackgroundLayout">