summaryrefslogtreecommitdiff
path: root/src/com/android/customization/widget/OptionSelectorController.java
Commit message (Collapse)AuthorAgeFilesLines
* Revert and fix "Fix for color picker pager getting clipped"Catherine Liang2023-03-221-8/+3
| | | | | | | | | | | | | | This reverts changes in Iad0573c378c6234febb55d7c054e2bb5716b1107. Reverting change because CL created unexpected UI changes in the original color section UI on Pixel 7 & Pixel 7 Pro. This new solution was tested on a variety of devices and should fix the margin issues without introducing unexpected UI changes to other devices. Bug: 221762001 Test: Manually verified on multiple devices Change-Id: Ic9f54ca74aad136c6451b46249bd8ff8a8d42e66
* Fix for color picker pager getting clippedabdullahirum2023-03-151-4/+9
| | | | | | | | | | | | the color picker in the CustomizationPickerFragment is being clipped prematurely. This CL ensures that the clipping doesn't occur video before:https://drive.google.com/file/d/1_kOYPWubYrS0s_Z8mSNHqF4CF7t0gsi5/view?usp=share_link&resourcekey=0-PkqdGUzJ3FtZ_9iLqxJrkg video after:https://drive.google.com/file/d/14k4em_PXJmQqxQTFQDeCMRMTQHDpvGTI/view?usp=share_link&resourcekey=0-D6qXOJ2QBXIh7dyud-vtXQ Fix: 221762001 Test: manual Change-Id: Iad0573c378c6234febb55d7c054e2bb5716b1107
* Color Picker Section (1/3)Catherine Liang2023-01-111-0/+10
| | | | | | | | New color picker section with entry point to color fragment. Refactoring & adding tests will be done in a separate CL. Bug: 262924584 Test: https://drive.google.com/file/d/1ZS8g3h4jfK2BPprhdSSrqRtn-hF5NFX3/view?usp=sharing&resourcekey=0-HAckwp7sa5doqq2XYgVEsw Change-Id: I0f77df1081e2cdb9f1f39331657a0615375d1889
* Force theme icons to stay on one row and adjust size to fitChris Poultney2022-12-051-22/+2
| | | | | | | | | | Screenshots are from Pixel 5 at default icon size: Before: http://screen/6ZFSVMqoNoDfGeQ After: http://screen/B7453xAXSLa4kJf Fixes: 250889939 Test: manually checked at different icon sizes on different devices Change-Id: I1c66cd60bb16027851fe22eba8f46b457e0fe341
* Fix overlap between app grid options in wallpaper settings.Chris Poultney2022-11-111-8/+8
| | | | | | | | | Large form factor: http://screen/9BVmRyiEcmFAWwE Small form factor: http://screen/VVj2pVVocFmyHta Fixes: 244257522 Test: TreeHugger Change-Id: Ia358167e800b26f17629777395a210e527e7f091
* Fixes color choice layout issue.Chris Poultney2022-09-221-9/+8
| | | | | | | | | | | Color theme picker size calculation had a bug that caused incorrect column count after scrolling through all pages of choices. Before: http://screen/BZdSY8NLSUTiz4z After: http://screen/4hAF2UpX2nsYrrH Bug: 248080123 Test: TreeHugger Change-Id: Ia17b03d9b1eaa1b102072fa201cae033222199f7
* Fixes spacing of color options in wallpaper picker.Chris Poultney2022-08-101-60/+58
| | | | | | | | | | | | This eliminates overlap and clipping of color option backgrounds, and also adds vertical spacing between rows if the options spill into a second row. Fixes: 227690986 Fixes: 240448797 Fixes: 231414521 Test: Passes TreeHugger Change-Id: Ia3a2a1c7ae27d9afdf446226c83845be2221f432
* Change color option and grid option layoutJohn Pan2022-01-061-4/+15
| | | | | | | | | | | | | | | | - Add color option horizontal padding - Change color option layout - Make grid option LINEAR_LAYOUT_HORIZONTAL_DISPLAY_OPTIONS_MAX comes from resource file Before: https://screenshot.googleplex.com/opwP97p7X8Qi6nL https://screenshot.googleplex.com/3igtadNkX5SUJzy After: https://screenshot.googleplex.com/AJZ43pWwCnGh6fr https://screenshot.googleplex.com/9SBxam4MTRM2gwN Bug: 193374285 Test: Manual Change-Id: I3dcc4a97caa0919053b7d1db9844d6d341d70209
* Fix Talkback announcing null when changing color optionJohn Pan2021-12-221-10/+1
| | | | | | | | | | | | | 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
* Talkback change for grid optionJohn Pan2021-12-101-41/+31
| | | | | | | | | | | | | | -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
* Update grid preview selectionJohn Pan2021-10-161-1/+13
| | | | | | | | | | | | | 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
* Fix grid option does not show selected stateChuck Liao2021-06-151-0/+5
| | | | | | | | | Video: https://drive.google.com/file/d/13v6P_Np7ijAhQhYDjMXUWkjs3MWqUMIX/view?usp=sharing&resourcekey=0-sI2jmTp0u1KuTalHNumuzg Bug: 189060136 Test: manual Change-Id: I98a5f2dfde187402a7ea83f40f9bff663e5f1cf6
* Use default item margin when no space for option peeking caseChihhang Chuang2021-05-311-5/+9
| | | | | | | | Screenshot for max display and font size: https://screenshot.googleplex.com/8hReLB6G4LUiL4c.png Fixes: 189711388 Test: Manually Change-Id: I91f94dc16a8e1d699e1e40e82487647c4fbd3ef6
* Update layout for grid optionsChihhang Chuang2021-05-271-6/+49
| | | | | | | | | | | | | | | 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
* Add overscroll effect to option gridsPierre-Louis2021-05-111-2/+0
| | | | | | Fixes: 187470337 Test: manual Change-Id: I270980805f71ae5ea37b013f62b0f92428f4e318
* Remove hard-coded colors in Wallpaper PickerTianguang Zhang2021-04-191-7/+3
| | | | | | | | 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
* Merge "Fix horizontal and vertical padding for options" into sc-devPierre-Louis Guidez2021-04-151-3/+1
|\
| * Fix horizontal and vertical padding for optionsPierre-Louis2021-04-141-3/+1
| | | | | | | | | | | | | | | | | | Screenshot (large): https://screenshot.googleplex.com/9878yWwEZzQFeWE.png Screenshot: https://screenshot.googleplex.com/5ZrnUWLti6PuC3x.png Fixes: 185319447 Test: Manual & Build Pass Change-Id: If896369a9710be04653471b1dce381e88e2a5ba7
* | Add containsOption method to OptionSelectorControllerSantiago Etchebehere2021-04-141-9/+19
|/ | | | | | | | And clean up the generics usage. Bug: 185419553 Test: manual Change-Id: I7b1e0cb565b19eab1b4abbe9f5eb9cb43f30cfd2
* Add alternative checkmark for currently selected optionSantiago Etchebehere2021-04-011-33/+60
| | | | | | Bug: 181111177 Test: manual Change-Id: I990b7a50860093ed5031db1772ab35e2239748c5
* Add infrastructure for extra customization sectionsChing-Sung Li2021-02-091-0/+11
| | | | | | Bug: 175869253 Test: Build WPPG and install to run Change-Id: Ib0c1edb0e1b0529bd3326f8d4df502f4dfc56b76
* Fix recyclerview items setup wrong descriptionWesley.CW Wang2020-07-081-5/+14
| | | | | | | | | | - 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
* Fix TB no response after double-tap style optionsWesley.CW Wang2020-07-011-0/+2
| | | | | | | | | | | | - 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
* Fix TB lose focus when navigating recyclerviewWesley.CW Wang2020-06-171-9/+41
| | | | | | | | | | | | | - 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
* Make check icon in thumbnail tile vary against system accent colorchihhangchuang2020-06-081-1/+2
| | | | | | | | | | | | | | 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
* Fix TB lose focus when recyclerview notify*ChangedWesley.CW Wang2020-06-051-0/+10
| | | | | | | | | | | | - 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
* Implement the custom style flow part 1Wesley.CW Wang2020-06-011-2/+2
| | | | | | | | | | | | | | - 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
* Refine style picker layout (1/2)Wesley.CW Wang2020-05-201-0/+4
| | | | | | | | | - 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
* Set pane title for accessibility issuesBeth Thibodeau2019-06-121-0/+2
| | | | | | | | | | 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
* Add content descriptions for custom pagesBeth Thibodeau2019-06-061-24/+50
| | | | | | Fixes: 131293339 Test: manual Change-Id: Ica713b4d110f198f64be533a240b7339027c4372
* Fix crash on rotation and tweak landscape layoutSantiago Etchebehere2019-06-051-5/+5
| | | | | | | | | 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
* Fix multiple selected optionsSantiago Etchebehere2019-06-031-0/+3
| | | | | | | | | 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
* Update checkmark to match specBeth Thibodeau2019-05-161-3/+3
| | | | | | Fixes: 132726773 Test: visual, example: https://photos.app.goo.gl/4psqvKPWfabBZrqp6 Change-Id: Ic461eb861b94311e8e705c68e9c20f7782ecc816
* Theme picker polish fixes.Amin Shaikh2019-05-091-0/+5
| | | | | | | | | | | | - 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
* Fix crash when clicking color optionsSantiago Etchebehere2019-05-081-13/+16
| | | | | | | | If there's no label for an option, don't try and set its content description Fixes: 132291556 Change-Id: Ib194ab84e6f0cba0d643af070c330178b81f6fe8
* Content descriptions for current preview optionsBeth Thibodeau2019-05-071-2/+24
| | | | | | Fixes: 131293339 Test: manual Change-Id: If378a60d46d8227c987cbdacd8bb907766a9def0
* Update content description for applied themeBeth Thibodeau2019-05-011-0/+5
| | | | | Fixes: 131293339 Change-Id: I10935d9517ebf47333b7bfd356fe5b9020688756
* Landscape support 2/nSantiago Etchebehere2019-04-261-3/+2
| | | | | | | | Basic layout support for custom theme. Previews still missing Bug: 125903559 Change-Id: I6363d8d7bbc421590a81d4c54b74cbb2b8c0b291
* Landscape support 1/nSantiago Etchebehere2019-04-261-11/+25
| | | | | | | | Correct layout of theme/clock/grid picker fragment, theme preview cards and custom theme still missing. Bug: 125903559 Change-Id: Ibdfe9d9c5a6ad22039ec5581764990d7c775c8d5
* Evenly space theme options.Amin Shaikh2019-04-251-4/+46
| | | | | | | | | | - 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
* Add checkmark to indicate currently applied styleBeth Thibodeau2019-04-221-0/+38
| | | | | Fixes: 126897804 Change-Id: I2bb2add206f3ee1a63372a8082d68f93fed90e60
* Add ripple effect to bottom nav and optionsAmin Shaikh2019-04-221-1/+13
| | | | | | | Fixes: 130761292 Fixes: 130760161 Fixes: 130759539 Change-Id: I9c34e62eaebd34e783cc43af2aab5d544e294d31
* Make theme picker options carousels full bleedAmin Shaikh2019-04-191-1/+2
| | | | | | Fixes: 130760271 Test: visual Change-Id: Icaea7de251ac7d795fe051d5f989c557b59bbf2e
* Custom Theme 7/n: delete custom themeSantiago Etchebehere2019-03-211-6/+12
| | | | | | | | | 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
* Implement "Apply theme" for default theme.Santiago Etchebehere2019-02-061-2/+3
| | | | | | | | Default theme requires disabling current overlays so it needs a different implementation. Bug: 120559294 Change-Id: I287d285a74c5b123f807b6589a2e81572abc30d0
* Add extra preview pages for themesSantiago Etchebehere2019-01-301-1/+1
| | | | | | | | | | Add preview pages for icons, color and shape to the theme section. See go/theming-guidelines-theme for specs Bug: 120559294 Change-Id: I9dabbbb33d670e7f02aebd66e3555e6785a17b7d
* ThemePicker: Implement the Clock sectionSantiago Etchebehere2019-01-221-1/+1
| | | | | | | | | | 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
* [ThemePicker 6/N] Create the theme tilesSantiago Etchebehere2019-01-091-0/+4
| | | | | | | | | Add a view for the tiles representing each option in the theme section. Bug: 120559294 Change-Id: If7590813b6509cc9e78d7ebca3123f24c8c07593
* [ThemePicker 5/N] Create a ThemeProviderSantiago Etchebehere2019-01-081-6/+7
| | | | | | | | | | | 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
* ThemePicker: Add an options selector widgetSantiago Etchebehere2019-01-021-0/+144
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