History log of /frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
52a80988da3d27f591abd43faa27eae120996ec2 26-Apr-2018 Anthony Chen <ajchen@google.com> Make complyWithUxRestrictions() protected instead of package private.

This allows ListItem.ViewHolder to be extendable outside of the support
lib package.

Bug: 78643055
Test: ./gradlew car:connectedCheck
Change-Id: I23f64c37936a979db24d8568ad894141f0e518e3
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
b8f226941fcb44b40d4ebe860f86e43f0afed9fc 06-Mar-2018 Yao, Yuxing <yaoyx@google.com> Support subheader list item.

Subheader will use adjustable start margin to match other types of ListItem.

Add a style for subheader to use colorAccent.
Add a ripple background for borderless button style to match custom bg color.

Bug: 74204389
Test: ./gradlew :car:connectedCheck
Change-Id: I2ced201a1b32177204cb1d6ba3bdbac38951f92a
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
08219a516dce4bece67c361ccc9831db8b70d496 12-Mar-2018 Anthony Chen <ajchen@google.com> Flip publish bit of car support library to true.

Test: generate current.txt file
Change-Id: Ie5222aa7a0d05804ac4fd3a3e20ba4d0cab3d016
Fixes: 69113630
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
ac5fe7c617c66850fff75a9fce9979c6e5674b0f 06-Mar-2018 Aurimas Liutikas <aurimas@google.com> Refactor support library

Test: None
Change-Id: I92e450c739fc9d77e8f8840bed4165ab88247fd6
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
f27b1ffc67228d73326ec3426fef4c9db75cd6fd 06-Mar-2018 Aurimas Liutikas <aurimas@google.com> Revert "Refactor support library."

This reverts commit b31c3281d870e9abb673db239234d580dcc4feff.

Change-Id: Icfa5b9af633739ad2c857dff22a2181bac6661ef
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
b31c3281d870e9abb673db239234d580dcc4feff 20-Feb-2018 Aurimas Liutikas <aurimas@google.com> Refactor support library.

Test: None
Change-Id: I11a047324832801555673dac45ec1d6590a6338b
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
15c4392796f5bb261c632412953db3fe753f9dda 28-Feb-2018 Anthony Chen <ajchen@google.com> Create a dark theme for applications to extend.

This theme will automatically color all PagedListViews and the drawer to
be dark.

Note, that the "light" versions of these themes right now are just
pass-throughs for the base theme. Refactoring this requires touching
many applications, so keeping it the same for now.

Lastly, the dark themes just use the night colors for now. Eventually,
the dark colors in the day should be slightly different.

Test: Test in a sample app.
Bug: 74088862
Change-Id: I12f1c1531267ff43622ce2853bb13cbb31cee3ab
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
461cc7c0bdf1c9f9f609cacda1ac9228b4281d51 27-Feb-2018 Yao, Yuxing <yaoyx@google.com> Use explicit function instead of lambda.

Also make methods that uses drivingstate API non-public.

Fixes: 73902945 73904539
Test: ./gradlew :support-car-demos:installDebug
Change-Id: Ibeca9119f30633d02e31c921acaa08203a5f3701
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
3737d1dff953969c27652b49b010ea9902b3da4f 07-Feb-2018 Yao, Yuxing <yaoyx@google.com> Support UXR in drawer and list item adapter.

Bug: 72970870
Fixes: 72160941
Test: ./gradlew :car:connectedCheck

make target for generating the stubs.jar is in ag/3569597.

- All tests will only run on automotive devices now due to implicit
dependency on android.car.

- We are ignoring exception from Car/UXR. Exception comes from car
connection failure, which should be handled in UxrManager so default
behavior (fully restricted vs. no restrictions) can be configured by
OEMs. Also this way 3rd party apps will not need to worry
about retrying.

- We are opting for unrestricted mode when UXR is unavailable. This is
more of a product decision to be made. So current decision is taking the
easier route.

- APIs in car support lib cannot expose APIs from android.car, namely
implementing OnUXRChangedListener, since android.car stub is only
available at compile time.

Change-Id: I4903838d9e21b3ba68508345bbbafa6fbab29ac4
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
20e9f85df9325d7dc79750be2527bd8dd1c38fcb 25-Jan-2018 Yao, Yuxing <yaoyx@google.com> Support clearing up custom view binders by:

create ViewHolder that accepts view binders for clearing up.
move addViewBinders() to parent ListItem class.
create new abstract methods in ListItem that used in bind().
change ListItemAdapter to expect ListItem instead of generic RecyclerView type.

Fixes: 71721195
Test: ./gradlew :car:connectedCheck

Change-Id: I48686b3dfe7feeb96c447af72a428950f89f2baf
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
172425512285f6da3c69b9405738df1f064336c1 17-Jan-2018 Yao, Yuxing <yaoyx@google.com> Update ListItem API from Builder to setters.

This allows ListItem to be modified post construction, e.g. changing
icon based on Wifi state.

Bug: 70578638
Test: ./gradlew :car:connectedCheck # Also verified in demo apk.
Change-Id: If7364917ad93ee68f6d3c5d9002cbe29840af596
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
4e832ea4269fff1780e0726c16bc37584957ba10 18-Dec-2017 Yao, Yuxing <yaoyx@google.com> Support list item with seekbar.

This CL includes several changes:
- Add abstract ListItem type
- Rename the original ListItem to TextListItem
- Add SeekbarListItem that extends ListItem with Car Seekbar style

Change-Id: Ic1ecd7ea986b91c45d08fcfd661077c6857da762
Fixes: 70578577
Test: ./gradlew :car:connectedCheck
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
acdf6a30e3d5b12defece58c35cfca2129838264 10-Jan-2018 Yuxing Yao <yaoyx@google.com> Revert "Support list item with seekbar."

This reverts commit 9ee1e2cb4f8f711403148ff57c800a25d6d8e178.

Reason for revert: accidentally enabled auto-submit. i made a few major changes so would like another round of review.

Change-Id: I231928e51307cfe5ce6337bb784cf080e445ede4
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
9ee1e2cb4f8f711403148ff57c800a25d6d8e178 18-Dec-2017 Yao, Yuxing <yaoyx@google.com> Support list item with seekbar.

This CL includes several changes:
- Add abstract ListItem type
- Rename the original ListItem to TextListItem
- Add SeekbarListItem that extends ListItem with Car Seekbar style

Fixes: 70578577
Test: ./gradlew :car:connectedCheck

Change-Id: I36819c16ac7521a8700c6a731bac393b900ce122
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
a975a56d488d2dd210527951f611c48b9c6734fc 09-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Support Switch in ListItem." into oc-mr1-jetpack-dev
22037e659c30185f51f522e1761236f780334c9d 08-Jan-2018 Yao, Yuxing <yaoyx@google.com> Support Switch in ListItem.

Bug: 70578596
Test: ./gradlew :car:connectedCheck # And demo app.
Change-Id: I4ad62d2993cde643e65a70891398a2bc31182279
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
9b0ebd7c98d4c0d73c101851014ecc5f4b70471a 29-Dec-2017 Jovana <jovanak@google.com> Add option to hide list divider for specific ListItems.

Added DividerVisibilityManager interface which should control visibility of individual item dividers.

ListItemAdapter implements DividerVisibilityManager. Added withDividerHidden() option to the ListItem.Builder to toggle dividers per ListItem.

To control visibility on individual dividers, one must call setDividerVisibilityManager on PagedListView and set it accordingly.

Usecase: Useful for visual grouping of many list items.

Change-Id: I58ea7d10b59bca55e0e0bdd6b9df20fdc633256f
Bugs: 70796176
Test: ./gradlew :car:connectedCheck, added a bunch of test cases, added LineItems without a divider to the sample ListItem activity.
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
5dbc4a83b9c6ea77dd85720a40de7dfc200ee872 22-Dec-2017 Yao, Yuxing <yaoyx@google.com> Keep primary icon in the same position regardless of text.

Primary icon will always have the same top distance to item top as when
it's centered vertically in double line item.

Bug: 70901105
Test: ./gradlew :car:connectedCheck with ag/3388278 cherrypicked.

Change-Id: If21ba9ed3e5cd53a8a4926b28e574bc21d7376e1
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
d0e9e80e8d49a82d43cda017f10df9a609cd6102 15-Dec-2017 Yao, Yuxing <yaoyx@google.com> Support list styles for PagedListView.

Removed withCardLook() so ListItem (and its future friend slider) will only
hold on to data. Item style will be set in adapter.

Support 3 item style:
card, square, items as a whole is a sqaure w/ rounded corner

Bug: 67606462
Test: verified in demo app - I couldn't find a way to get radius out of
item background.

Change-Id: I66661a51f61258fb4bc2228eab9a4dfb160b2778
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
439968fcab76ed121a8c514ae904840cac9b2076 13-Dec-2017 Yao, Yuxing <yaoyx@google.com> Set supplemental icon to be un-clickable when it has null click listner.

Bug: 70577744
Test: ./gradlew :car:connectedCheck # also verified in demo app
Change-Id: Ib88d83d973ec28d82bcbdfc0a5f52c84f3a8356f
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
a565726ba2ad8cba4d28e206495dafc1d4eebdd5 11-Dec-2017 Yao, Yuxing <yaoyx@google.com> Avoid carried-over sub-view layout params.

Set all relevant fields of a view during binding. This way when items get bound
to recycled view holders, they do not reuse layout params from previous item.

Bug: 70405534
Test: reproduced then verified fix in demo app. Also added new tests.
Change-Id: I8a212588c495e9c05a6df33e5267f9d0bc2fda34
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java
e048d0d3137fbee6430d3481aaa7269d221a7d45 28-Nov-2017 Yao, Yuxing <yaoyx@google.com> Support Items in PagedListView.

Also update demo app to show various items.

List item specs defined at:
https://spec.googleplex.com/aauto/embedded-components/list-items.html#list-items-specs

Screenshots:
https://screenshot.googleplex.com/pAdBqeU6r9w
https://screenshot.googleplex.com/bx18A4bTny4

BUG: 69554077
Test: ./gradlew :car:connectedCheck

Change-Id: I62b7d1c0c5967335ffedd2de46f6048e7a38222d
/frameworks/support/car/src/main/java/androidx/car/widget/ListItem.java