summaryrefslogtreecommitdiff
path: root/src/com/android/customization/widget/OptionSelectorController.java
AgeCommit message (Collapse)Author
2021-12-22Fix Talkback announcing null when changing color optionJohn Pan
Move the Talkback announcement for options from OptionSelectorController to GridFragment. We only need this logic for grid option and it's hard to understand with the color option without title. Videos: -Before: https://drive.google.com/file/d/1-tFBWwz_SjbenpmAozPhlC7dRRFHiDkN/view?usp=sharing&resourcekey=0-SLo4PJEo3G3J0O_LVYSd7A -After: https://drive.google.com/file/d/1-XTa--g59Dw_HXxm5SjofE2nxlBWDhtY/view?usp=sharing&resourcekey=0-e9mS5uqltrAR3zyXS8cUqQ -After GridFragment: https://drive.google.com/file/d/11sDHACAOSU4npMao_4f-NUKUje3fZlfj/view?usp=sharing&resourcekey=0-8Pm0qkzvLilSMhpzUBWr6A Bug: 210801885 Test: Manual Change-Id: If47204681655f42741a2e46e2d585144a7d08711
2021-12-10Talkback change for grid optionJohn Pan
-Set content description when grid option not applied nor selected ex "4 x 4" -> "4 x 4, change applied or previewed" -Say "4 x 4, currently previewed" after double tap -Don't focus on apply button after double tap grid option Videos: -Before: https://drive.google.com/file/d/1-5b2bJsvof2WGaaqHjwxJnGGtJWWJUHD/view?usp=sharing&resourcekey=0-PFRWQEqtvxVRZKUC2SUEGg -After: https://drive.google.com/file/d/11kUz8uw7evHpNe-ZvSSG6-sxmUJsPtRr/view?usp=sharing&resourcekey=0-C-BrJmvPgxFmbgvkWn5yQw Bug: 207804306 Test: Manual Change-Id: I7f7b02286b35e82fab38d4b3d770211928e6e9ef
2021-10-16Update grid preview selectionJohn Pan
Vedios: -Before: https://drive.google.com/file/d/1HO5LWSmpFpdDk5BjaChEHYRKRbOTKovh/view?usp=sharing&resourcekey=0-lJ7hGNn783U9sVKhOCJ3vg -After: https://drive.google.com/file/d/1I5HTG6wrbB3KU-_7Cpf5zyD485TknUmJ/view?usp=sharing&resourcekey=0-KVF8KQtYg-JNahGsaszUWQ Bug: 201572713 Test: Manual Change-Id: I664db7941b9fe36c300040e95ccb4f0300a37c59
2021-06-15Fix grid option does not show selected stateChuck Liao
Video: https://drive.google.com/file/d/13v6P_Np7ijAhQhYDjMXUWkjs3MWqUMIX/view?usp=sharing&resourcekey=0-sI2jmTp0u1KuTalHNumuzg Bug: 189060136 Test: manual Change-Id: I98a5f2dfde187402a7ea83f40f9bff663e5f1cf6
2021-05-31Use default item margin when no space for option peeking caseChihhang Chuang
Screenshot for max display and font size: https://screenshot.googleplex.com/8hReLB6G4LUiL4c.png Fixes: 189711388 Test: Manually Change-Id: I91f94dc16a8e1d699e1e40e82487647c4fbd3ef6
2021-05-27Update layout for grid optionsChihhang Chuang
Spec: https://screenshot.googleplex.com/HeqNgrqnsaiMoia.png Screenshot (1-5 options): https://screenshot.googleplex.com/4sShjAjyu2xC8nw.png https://screenshot.googleplex.com/3TThvJLr8omoMsm.png https://screenshot.googleplex.com/BpGbpTdzPSNGCt5.png https://screenshot.googleplex.com/BM3z8g9mcrTktr3.png https://screenshot.googleplex.com/BegfDpyXwvMw6j3.png Fixes: 187138127 Test: Manually Change-Id: I92c541ce54a5c3144d6048407b2434d468680ca5
2021-05-11Add overscroll effect to option gridsPierre-Louis
Fixes: 187470337 Test: manual Change-Id: I270980805f71ae5ea37b013f62b0f92428f4e318
2021-04-19Remove hard-coded colors in Wallpaper PickerTianguang Zhang
The CLs in this topic remove the hard-coded colors from the app, replacing them with ?android:attr/, ?attr/, and sometimes @color/ that is defined using device default colors. Fixes: 173549815 Test: none added Change-Id: I4f0d18c1c4afdc5e1651e5b34fef8c7d71cdf8b7
2021-04-15Merge "Fix horizontal and vertical padding for options" into sc-devPierre-Louis Guidez
2021-04-14Add containsOption method to OptionSelectorControllerSantiago Etchebehere
And clean up the generics usage. Bug: 185419553 Test: manual Change-Id: I7b1e0cb565b19eab1b4abbe9f5eb9cb43f30cfd2
2021-04-14Fix horizontal and vertical padding for optionsPierre-Louis
Screenshot (large): https://screenshot.googleplex.com/9878yWwEZzQFeWE.png Screenshot: https://screenshot.googleplex.com/5ZrnUWLti6PuC3x.png Fixes: 185319447 Test: Manual & Build Pass Change-Id: If896369a9710be04653471b1dce381e88e2a5ba7
2021-04-01Add alternative checkmark for currently selected optionSantiago Etchebehere
Bug: 181111177 Test: manual Change-Id: I990b7a50860093ed5031db1772ab35e2239748c5
2021-02-09Add infrastructure for extra customization sectionsChing-Sung Li
Bug: 175869253 Test: Build WPPG and install to run Change-Id: Ib0c1edb0e1b0529bd3326f8d4df502f4dfc56b76
2020-07-08Fix recyclerview items setup wrong descriptionWesley.CW Wang
- Adjust the recyclerview setLayoutManager() timing, since we set it twice when using gird layout, it will mis-trigger our setContentDescription() method randomly and make some options setup wrong content description video: https://drive.google.com/file/d/1xGjw9zacgeQsPtQA7DkWo3d-TvzPUYIi/view?usp=sharing Fixes: 160761967 Test: manually Change-Id: I52eec0f40e5c65c5e520abe32a08611959ce5d13
2020-07-01Fix TB no response after double-tap style optionsWesley.CW Wang
- Use setAccessibilityPaneTitle to notify/update the a11y states when selecting other options. - Since we only update the state to our structure not original android components, recyclerview option's state(isSelected) won't be updated when selected. By default, TB will announce "selected" after selecting new options, but we custom it and not following default behavior(by setting extra content description to make it announce "currently previewed"), need to setup the a11y panel title to make it update the a11y states then TB will announce it after selected. video: https://drive.google.com/file/d/1Q2pSz116JL0bg7HpK3ULoTUhpXTyZoWo/view?usp=sharing Bug: 157004966 Test: manually Change-Id: Ib96e0d1013a000022d85df2840e8680e564b844b
2020-06-17Fix TB lose focus when navigating recyclerviewWesley.CW Wang
- Issue history: b/37088814 and previous workaround: ag/11747784 - Since the previous workaround no longer works, apply new scroll behavior to the recyclerview when TB navigating, make sure the focusing item's previous/next item totally visible, then TB won't lose focus. video: https://drive.google.com/file/d/1KJQT9cAmm9G5yZGDZZTNnpezDbT_Rh31/view?usp=sharing Bug: 157007291 Test: manually, enable TB and test the result Change-Id: I1c4c8416d7b1849cf705db931bcd9c6e5c354719
2020-06-08Make check icon in thumbnail tile vary against system accent colorchihhangchuang
Mock: https://docs.google.com/presentation/d/15JadcGi5k1_0znUN_XdFpU7UxeXwxjK3Y7LxvhW5ETM/edit?ts=5eb5f9a8#slide=id.g777aaff414_1_0 Screenshot: https://screenshot.googleplex.com/D8Oua3hJ5qg.png https://screenshot.googleplex.com/b4sBUjrQwak.png https://screenshot.googleplex.com/1NFNw5yGpMR.png Test: Manually Fixes: 158429764 Change-Id: Ic20576505bebd61c8cda3e2ccc54973dee62acf8
2020-06-05Fix TB lose focus when recyclerview notify*ChangedWesley.CW Wang
- Override getItemId(), set setHasStableIds to true and setItemAnimator to null to fix TalkBack when lose focus when receive notify*Changed() - Issue's history and workaround all from b/37088814 video: https://drive.google.com/file/d/1gEDOUTY3A2OMDWKgPGvxourXmW-p9D9K/view?usp=sharing Bug: 157007291 Test: manually, enable TB and test the result Change-Id: I042f65bbc8f26f5685d83f3253b3ffff8d78ca73
2020-06-01Implement the custom style flow part 1Wesley.CW Wang
- Make the options horizontal scrolls, note that the picker side UI will be vertical scroll(like Style and Grid tab) - Adjust custom style flow pages layout, will have next cl to fine-tune the recyclerview and options Doc: https://docs.google.com/presentation/d/15JadcGi5k1_0znUN_XdFpU7UxeXwxjK3Y7LxvhW5ETM/edit#slide=id.g85fff7c452_6_15 Video: https://drive.google.com/file/d/1x2oc6p2TOUpO3JUSr3tkrF3fZ61PBZ-v/view?usp=sharing Bug: 151285666 Test: manually Change-Id: If0cbb5afa1d5e005805a8459467cda89609fd97a
2020-05-20Refine style picker layout (1/2)Wesley.CW Wang
- Change options border to 8dp, https://docs.google.com/presentation/d/15JadcGi5k1_0znUN_XdFpU7UxeXwxjK3Y7LxvhW5ETM/edit?ts=5eb5f9a8#slide=id.g777aaff414_1_0 - Fix the options will be truncated when display size large, before: https://screenshot.googleplex.com/j1GckxT9fxU.png after: https://screenshot.googleplex.com/LMEzQwjz2Vc.png Change-Id: Id238bb1c0c31471c43f50c4ff0e2a37f6b24dd61
2019-06-12Set pane title for accessibility issuesBeth Thibodeau
The icon and color tileView didn't update content description readout until re-selected. Setting the pane title updates it immediately instead. Fixes: 131293339 Test: manual Change-Id: I00f152adf5eb599154258cc820dc780197d0f477
2019-06-06Add content descriptions for custom pagesBeth Thibodeau
Fixes: 131293339 Test: manual Change-Id: Ica713b4d110f198f64be533a240b7339027c4372
2019-06-05Fix crash on rotation and tweak landscape layoutSantiago Etchebehere
Error and loading views were missing from the landscape layout causing it to crash, also tweak the landscape layout for improved UI. Bug: 134529293 Change-Id: I53d08b6c165b4b3311c98475356f68e7a9a37df0
2019-06-03Fix multiple selected optionsSantiago Etchebehere
Make sure options that are out of the screen get updated when selecting a different option so they get properly drawn when they're back in view. Fixes: 134176881 Change-Id: Iebc32f44da63ac5e4dc618c98d7f3a233cfa4b3c
2019-05-16Update checkmark to match specBeth Thibodeau
Fixes: 132726773 Test: visual, example: https://photos.app.goo.gl/4psqvKPWfabBZrqp6 Change-Id: Ic461eb861b94311e8e705c68e9c20f7782ecc816
2019-05-09Theme picker polish fixes.Amin Shaikh
- Do not show Previous on first custom screen - Show a toast instead of exiting the activity when applying the clock - Mutate drawables in custom theme icon preview thumbnails Fixes: 132282403 Fixes: 132282415 Test: visual Change-Id: If230c5c95ba92b787b9e6580261b0a662c159549
2019-05-08Fix crash when clicking color optionsSantiago Etchebehere
If there's no label for an option, don't try and set its content description Fixes: 132291556 Change-Id: Ib194ab84e6f0cba0d643af070c330178b81f6fe8
2019-05-07Content descriptions for current preview optionsBeth Thibodeau
Fixes: 131293339 Test: manual Change-Id: If378a60d46d8227c987cbdacd8bb907766a9def0
2019-05-01Update content description for applied themeBeth Thibodeau
Fixes: 131293339 Change-Id: I10935d9517ebf47333b7bfd356fe5b9020688756
2019-04-26Landscape support 2/nSantiago Etchebehere
Basic layout support for custom theme. Previews still missing Bug: 125903559 Change-Id: I6363d8d7bbc421590a81d4c54b74cbb2b8c0b291
2019-04-26Landscape support 1/nSantiago Etchebehere
Correct layout of theme/clock/grid picker fragment, theme preview cards and custom theme still missing. Bug: 125903559 Change-Id: Ibdfe9d9c5a6ad22039ec5581764990d7c775c8d5
2019-04-25Evenly space theme options.Amin Shaikh
- Use a grid layout for choosing accent color - Do not show checkmark on customization options - Disable overscroll effect when container doesn't scroll Fixes: 130762389 Test: visual Change-Id: I70df2621410ee017b4ef0e11b7c1968a9e0271f3
2019-04-22Add checkmark to indicate currently applied styleBeth Thibodeau
Fixes: 126897804 Change-Id: I2bb2add206f3ee1a63372a8082d68f93fed90e60
2019-04-22Add ripple effect to bottom nav and optionsAmin Shaikh
Fixes: 130761292 Fixes: 130760161 Fixes: 130759539 Change-Id: I9c34e62eaebd34e783cc43af2aab5d544e294d31
2019-04-19Make theme picker options carousels full bleedAmin Shaikh
Fixes: 130760271 Test: visual Change-Id: Icaea7de251ac7d795fe051d5f989c557b59bbf2e
2019-03-21Custom Theme 7/n: delete custom themeSantiago Etchebehere
Add delete option on custom theme fragments, and reload the options when going back after deleting to ensure we show the correct ones. Bug: 124796742 Change-Id: I23fa0f418a3872a5426faa4b7d514bc0395f79b5
2019-02-06Implement "Apply theme" for default theme.Santiago Etchebehere
Default theme requires disabling current overlays so it needs a different implementation. Bug: 120559294 Change-Id: I287d285a74c5b123f807b6589a2e81572abc30d0
2019-01-30Add extra preview pages for themesSantiago Etchebehere
Add preview pages for icons, color and shape to the theme section. See go/theming-guidelines-theme for specs Bug: 120559294 Change-Id: I9dabbbb33d670e7f02aebd66e3555e6785a17b7d
2019-01-22ThemePicker: Implement the Clock sectionSantiago Etchebehere
Add a Fragment to show and apply available clockfaces. A few more iterations are needed on the UI but this CL focuses on the functionality. Bug: 120560400 Change-Id: I809cb861cf4c03c4b6d84b94e839300dbea200a1
2019-01-09[ThemePicker 6/N] Create the theme tilesSantiago Etchebehere
Add a view for the tiles representing each option in the theme section. Bug: 120559294 Change-Id: If7590813b6509cc9e78d7ebca3123f24c8c07593
2019-01-08[ThemePicker 5/N] Create a ThemeProviderSantiago Etchebehere
Create a Provider that can read the themes available in the system from a stub apk. For now we only read Font and Color overlays (the rest coming in a follow up CL). Bug: 120559294 Change-Id: I78f1a31073ff219befc7b0d37227afb38c746380
2019-01-02ThemePicker: Add an options selector widgetSantiago Etchebehere
Create a controller class to wrap a RecyclerView Adapter used to display the thumbnail tiles with customization options in each section Bug: 120559294 Change-Id: I67a99e5c1caaf03ea96a02a7ffbadd15d0b14b7e