aboutsummaryrefslogtreecommitdiff
path: root/RotaryPlayground/src/com/android
AgeCommit message (Collapse)Author
2021-08-19Add an example of popup windowYabin Huang
Bug: 194954154 Test: manual Change-Id: Ifbd468ec38a2cb519e5f5343dde5e64c10d2a8aa
2021-08-02Merge "Remove usage of deprecated DirectManipulationHelper methods" into ↵TreeHugger Robot
sc-v2-dev
2021-07-30Remove usage of deprecated DirectManipulationHelper methodsCole Faust
Bug: 190783163 Test: Compiling Change-Id: Ia32a3756335baa01ca73b5d867bd85001e3b2dc0
2021-07-24Add an example of overlapped SurfaceViewYabin Huang
Bug: 194148552 Test: manual Change-Id: I6e2509a8eda887cb5a1edebd6f48530f33448f2c
2021-06-25Fix a crash when creating PendingIntentandroid-12.0.0_r32android-12.0.0_r29android-12.0.0_r28android-12.0.0_r27android-12.0.0_r26android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android-12.0.0_r16android12-qpr1-releaseandroid12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseandroid12-qpr1-d-releaseandroid12-devYabin Huang
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. So this CL uses FLAG_IMMUTABLE to create the PendingIntent because the flag is recommended in most cases. Fixes: 192103710 Test: manual Change-Id: Ie736f88ee939774d7e8ef95b91dbcf8e462950ee
2021-04-16Demo updating a view without losing focusYabin Huang
Add a FocusArea to the Cards tab to demonstrate how to update a view properly. Fixes: 185377477 Test: manual Change-Id: I66038ef4677ee904246bf1dd16503fca4b27c9c1
2020-11-12Update Rotary Playground for direct manipulationHeemin Seog
Bug: 169884295 Test: manual Change-Id: I2ef1589cf9ae1cc82480b69ad120e6c947df3746
2020-09-18Add an example to demo custom FocusAreaYabin Huang
Bug: 155698037 Test: manual Change-Id: I4bf0648d66da4804e9d67c8f98accd92f65cbd41
2020-09-02Add a WebView to the reference appDanny Epstein
Add another fragment to the RotaryPlayground reference app for testing rotary navigation into, out of, and within WebViews. The WebView's content is chosen to include sections without any focusable elements. Includes a button to toggle the visibility of two buttons in the same focus area with the WebView. This enables testing: - nudging into a focus area with only a WebView without any visible focusable elements - rotating into a WebView without any visible focusable elements. Bug: 159936127 Test: manual Change-Id: I1273e32eec49ad0983f8875c4ad95938c7e50211
2020-07-18Improve tabs in reference app.Danny Epstein
For now, don't switch tabs on focus. Select the button for the active tab and visually indicate the selected button. Bug: 157241844 Test: manual Change-Id: I3f99b9a9a2a8c48d33e7852a75b4ecf3483280ba
2020-06-16Make scroll fragment more challenging.android11-devDanny Epstein
Add a gap between focusable elements to test the transition from an element being focused to the scrollable container being focused and vice versa. Add non-focusable content at the top and bottom of the list to make sure you can scroll to the top and bottom in this scenario. Add other focusable views in the same focus area with the scrollable view to test rotation into and out of scrollable containers. Remove content description indicating that the CarUiRecyclerView is scrollable. CarUiRecyclerViews are now opt-out rather than opt-in. Bug: 154540419 Test: manual Change-Id: Iea3723dedd255817e4c6fc5c6b0487bccbe2604c
2020-06-11Add direct manipulation sys window widgets.Pardis Beikzadeh
In particular, adding 2 SeekBars and 2 RadialTimePickerViews. 2 because in a system window, a given View can be marked as "supports direct manipulation mode" or not. So we add 1 of each thing that supports DM mode and one that doesn't. For the ones that support, entering DM mode allows rotary controls to be used to manipulate the value. For the ones that don't, the event that would have entered DM mode instead triggers an ACTION_CLICK which in our implementation changes the background color on every other invocation. Test: manual, build, install, run the app BUG: 153888753 Change-Id: If1d4de9def33c8bf062e6f0ce202b99797e2d014
2020-06-05Reduce code duplication further.Pardis Beikzadeh
Given that onPause() method needs to also disable DM mode, I moved the logic around some more so it can be reused there and by the DirectManipulationHandler class. Also fixed a bug I found that didn't consume nudge and rotation events when no handler delegate was provided for them. Not consuming the nudge events means that in DM mode user can nudge out of the view that should be directly manipulated. The rotation one doesn't cause an issue as far as I can tell but I am consuming them because that is what the javadoc claims to do (provide a "noop" impl if a delegate not provided = consume event and do nothing). BUG: 156978213 Test: make, install, run code Change-Id: I417b2dcbd5e0fd36e11db58681a8baff9bbfcf8e
2020-06-04Add notification fragment to reference app.Danny Epstein
The notification fragment has two pairs of buttons, with one pair at the top where it will be covered by the heads-up notification (HUN) and one further down where it won’t be covered by the HUN. Each pair includes a button to post a notification that will appear as a heads-up notification and a button to clear the previously posted notification. Test: manual Bug: 155681517 Change-Id: If2ac76cece527d7e45756dbf5659fa86cc98ac2a
2020-06-01Add a Scroll demo to RotaryPlaygroundAgatha Man
Bug: 154971276 Test: make and install Change-Id: Iaa884c4920b910115440ed8181b7fbd6c5ddafba
2020-05-28Refactor code to reduce duplication.Pardis Beikzadeh
BUG: 153886988 Test: make, install and run Change-Id: I64294a3438e297fb8c6e90b078697b883dee8cb4
2020-05-28Add listeners for the direct manipulation example widgets.Pardis Beikzadeh
BUG: 153886988 Test: make, install, ran the app Change-Id: I2b18cee5ae84519316bfe98e551858257e268714
2020-05-19Exit direct manipulation mode when the fragment is not activeYabin Huang
This is to prevent the app stuck in DM mode. This CL also refactors the fragmet to allow to initialize multiple direct manipulation views easily. Fixes: 156787734 Test: manual Change-Id: I63c78c897cb87c78c2883eed0b726049dce76884
2020-05-12Add a custom DirectManipulationViewYabin Huang
1. Add a custom DirectManipulationView and make it support DM mode 2. Make the TimePickers focusable so that they can support DM mode 3. Put each TimePicker into a separate FocusArea. A TimePicker has several focusable views and it's difficult to move to another TimePicker via rotation. Let's use nudge to move to another TimePicker. TODO: exit DM mode when the app goes to background. Fixes: 153888710 Test: manual Change-Id: Id9168bac10ffabbf82eff1bbf1bb080fab5a4f55
2020-05-11Add a direct manipulation screen and some widgets.Pardis Beikzadeh
BUG: 153886988 Test: manual, Danny ran the app Change-Id: Idd0c128b0c272a9827b1f24e5edf2d97b3fbcf0c
2020-05-11Add Grid RecyclerView to Rotary PlaygroundAgatha Man
Added a screen with a Grid CarRecyclerView to test z-pattern rotating navigation and vertical scrolling. Bug: 154957299 Bug: 154971276 Test: manual Change-Id: I685637db07d89a3a43dd2321c1af359ad5e6f277
2020-04-20Add rotary reference appAgatha Man
This CL contains the base structure for the app. Rotary demo does not work yet because FocusArea is not available yet. Bug: 153470636 Test: make and install Change-Id: I22ff278fff9ee280cf7f7e040b574ada1b79689a