History log of /frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0ceb8d53e39ebb5bc103863787afb39ec5c41ad8 18-Mar-2017 Maurice Lam <yukl@google.com> Add ability to require scroll to GlifLayout

Generalize RequireScrollHelper and turn it into a mixin to allow
GlifLayout to use require scrolling.
This is only applicable to GLIF with sticky footer, since inline
content button requires scrolling by definition.

Also added Robolectric test support for full-support, by moving
full-support/test's contents into full-support/test/instrumentation
and put the new Robolectric tests in full-support/test/robotest.

Bug: 36387078
Test: ./gradlew connectedAndroidTest test
Change-Id: Ib07ec0ddf07affa30c46e786f4e9be7853a243c4
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
e2a8d27c2a43cf0b48b80e5b05f893222c541e04 17-Feb-2017 Maurice Lam <yukl@google.com> Add theme fallback

- Add FallbackThemeWrapper, which behaves like ContextThemeWrapper,
except that the base context's theme attributes takes precedence
over the wrapper context's.
- Use the FallbackThemeWrapper in TemplateLayout (SetupWizardLayout
and GlifLayout), so that inflating them with the wrong theme will
not crash, but rather look wrong.

This allows SuwLib to add required attributes without risking
crashing clients that for some reason doesn't use the right themes.

Test: ./gradlew connectedAndroidTest
Change-Id: I694ad7279ce733659f6aa5d72e2087a09d3f1e22
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
7514f1cee29b3feb4822ce16945c1c312057d24f 19-Dec-2016 Maurice Lam <yukl@google.com> Implement Mixins for Templates

Implement Mixin functionalities, which defines part of a template
layout, making it reusable in different layouts. For example, the
HeaderMixin allows setting and getting the header text via the mixin,
which allows for clients which uses multiple different layuots to
simplify their code via something like
layout.getMixin(HeaderMixin.class).setText("Foobar");

Bug: 34163318
Test: ./gradlew connectedAndroidTest
Change-Id: I4348c8bb5b8e640b49c2be0c79c70aa85cf0ebc0
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
63cdc5ccb7f1f61d0e752e38d7e57c690658a0ac 23-Nov-2016 Maurice Lam <yukl@google.com> [SuwLib] Turn on fatal lint

Fix (or suppress) lint warnings and make it fatal again in the build
process.
Additionally, warnings are treated as errors now. If there are
warnings that are not applicable, add @SuppressLint or tools:ignore
to suppress the warning, so code reviewers can be aware of the lint
issue too.

Test: ./gradlew lint
Change-Id: I63c83ff1b95a0817dc2ac777adce0fa9f9ebd45a
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
7f2a6e95f20408e055bb8b965b9e2bc664eec86b 28-Apr-2016 Maurice Lam <yukl@google.com> [SuwLib] Check instance state type before casting

Bug: 28390168
Change-Id: Ic8cb9c35b29fe05f1edc6c8fa7c0bd7d23cd4fdf
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
3aee7b9de403e669e24ce68da1b390ab74288364 25-Mar-2016 Maurice Lam <yukl@google.com> [SuwLib] Catch RuntimeException during template inflation

On platform versions < M, RuntimeException is thrown when an
attribute is not found. This is changed to InflateException since M.
Catch the more generic RuntimeException so we will show the more
helpful error message on previous versions as well.

Bug: 27153117
Change-Id: I6367f2f2c6adfaab0c3dc1297249d08225c99d9c
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
99586481628659cd2982a0248bc0d09a6ec4590e 18-Mar-2016 Maurice Lam <yukl@google.com> [SuwLib] Improve wrong theme error message

Improve the error message in SetupWizardLayout and GlifLayout to
mention the correct themes when there is an InflateException.

Bug: 27153117
Change-Id: I0b76713b820fd26fd2c8808819887e360c3e87a3
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
6cd984308b537924865bde77c2ee13d072cd9a48 10-Mar-2016 Udam Saini <udam@google.com> Exposes a way to get the header view.

This is needed inside settings to find the header view.

bug:27591940
Change-Id: I49d3c84583faacb4a42b3321e57d2e3b025a38f0
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
bf4afac02228e42af171bbb5f3db11977be487b1 20-Feb-2016 Maurice Lam <yukl@google.com> [SuwLib] Allow setting progress bar color

Bug: 26458108
Change-Id: Icf736a0ce9f615efc0ab1dfecac17d01358ead92
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
ec9d8c8aa8fdeb6640fb0037b062bf10ca1c016b 09-Feb-2016 Maurice Lam <yukl@google.com> [SuwLib] Fix showProgressBar for RecyclerLayout

Fix show and hide progress bar for RecyclerLayout by introducing
findManagedViewById method in SetupWizardLayout, so that it can
find progress bar even if it is not currently laid out in the view
hierarchy.

Also added setProgressBarShown(boolean) to make the interface
consistent with GlifLayout.

Change-Id: Icc44d91e2d6030b210304ad81c158be67b7050f1
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
0e9b312956dd28cef21473337800919eb0a54b2d 28-Jan-2016 Maurice Lam <yukl@google.com> [SuwLib] Add sticky header to recycler view

Change-Id: Ib06ab550c16471fbdae3c348f9c91dd42893a138
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
95abb283deb209532bbbae4ade3f5cc149a548a6 09-Sep-2015 Maurice Lam <yukl@google.com> [SuwLib] Make getScrollView public

Make getScrollView public so that client apps can get the scrollview
without using findViewById and making assumptions about the type.

Change-Id: I79b73e4b2a02831147b49e7d9137b7954759c360
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
b38561602db3fc1b31c7ee907da41ec2c53e4764 19-Aug-2015 Maurice Lam <yukl@google.com> [SuwLib] Fix javadocs

Convert existing javadocs, which is more plain-text-ish, to javadocs
using proper HTML and javadoc tags.

Bug: 21444334
Change-Id: Iea79b3371c4e1c1c99515abd1c1492f37ad38d05
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
bdfc0132ff90a333de202adfbf204cdc8139e632 13-Aug-2015 Maurice Lam <yukl@google.com> [SuwLib] Refactor out TemplateLayout

Refactor TemplateLayout as a base class for SetupWizardLayout, which
is a generic layout that takes the "android:layout", inflates that as
a template and put its children in the "container".

Change-Id: Id7977787ffa6cdb5df7a4cb8172ce1fa6a52ed45
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
8c10c403c063aff3f17c4949b0fe9a88536ae580 29-May-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Support for ObjectAnimator

Support for animator to animate SetupWizardLayout horizontally, which
requires adding a setXFraction method, changing the translationX with
respect to the width of the view.

Also moved annotations to com.android.setupwizardlib.annotations
package to avoid class loading problems in clients that use support
annotation library.

Bug: 20110840
Change-Id: Ibfb900323bcf4f32c8ded4c4a6dbf4765f17751a
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
2d77e072fed129b34e473c7f77246a2b064fab7d 29-May-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add support for require scrolling

Add SetupWizardLayout.requireScrollToBottom method that will register
a RequireScrollHelper on the layout. When the helper is registered
and the content view can scroll, the next button will be hidden and a
down-arrow button is shown, which will scroll the page down when
clicked.

Change-Id: Ib9ddcbeec24169cc00265fe107deb1b5099cba8d
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
caf3ce9f8da61e59a7b7dacbce2e1f8e23d3231e 21-May-2015 Russell Brenner <russellbrenner@google.com> Add getHeaderText

Utility routine to return the current header.

Change-Id: I53a5d80a0b65f4388c429503bada9271a3286695
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
7114577a094593dbf55b625146b3809800697030 23-Apr-2015 Jorim Jaggi <jjaggi@google.com> [SetupWizard] Add attributes for illustration size

Allow the client to change the illustration size by specifying
suwIllustrationAspectRatio and suwHeaderPaddingTop.

Change-Id: I0a3a91bbf9bf5672c7ba220560c723257f4a654a
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
d61674efcfaa9f591a44fc75d59566cdd5b409eb 03-Apr-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add progress bar support

Added methods showProgressBar, hideProgressBar and isProgressBarShown
to SetupWizardLayout, that will show the bar if the corresponding
ViewStub exists.

This implementation has an improvement over existing Setup Wizard
implementations in that it supports ListViews as well as ScrollViews,
and the progress bar will be sticky together with the header instead
of being scrolled away.

Change-Id: Ifd7acae36a9b244d759b6528bb5dfdc3e1d15091
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
9f9367672191190f903955d09a4314d40869acc6 27-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Eclair compat build

Bug: 19929602
Change-Id: I0e3ed9024461ec50efe2258031c1d2648f0d333f
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
7e5f0f0ea3b3075258cac9d26f90fd97c1a71dca 23-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add getNavigationBar

Add getNavigationBar method to SetupWizardLayout

Change-Id: I49eeb5cfee2917d5b4e3f552f9c3b68747dcd79a
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java
2646e1d82ec6d133b35b775f044e156fca6d9d75 17-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Changed project hierarchy

Moved res-ics to ics/res, and res, src, AndroidManifest to main/.
This fits more to the "canonical layout" expected by gradle, and
works around the issue where blaze is expecting every res directory
used by a target to be named the same (including its library
dependencies and its transitive dependencies).

Change-Id: I658e3c0a67a01f379c43d3fad82cd40f9aa8cd28
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/SetupWizardLayout.java