summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-13.0.0_r35' of ↵George Zacharia2023-04-031-0/+1
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 release 35 Change-Id: I709958b2f015d1774b2ece25894467c3a279f93c
| * Fix qs rows count on foldablesAnton Potapov2022-11-141-1/+0
| | | | | | | | | | | | Fixes: 255102159 Test: Manual on foldable device + autotest Change-Id: I54243e2373fa6fac26886618173ef4c4b5a71a3a
* | SystemUI: qs columns count settingsmaxwen2023-01-031-3/+15
|/ | | | | | and vertical qs tile layout settings (and resource config) Change-Id: I5b519ad62d17fec16400229264c66cbbde2a2031
* Fix last tile bottom calculationFabian Kozynski2022-05-091-8/+8
| | | | | | | | | | Use the unoverriden height for tiles (only relevant for tiles in QS while expanding for QQS). This way, we get the bottom after animations will be finished. Test: manual, with media and in split shade Fixes: 231399422 Change-Id: Ib67dcb09e3b97ea3dbb27a92d2a14bc00fc64b6e
* Manually set mLastTileBottom when not laying outFabian Kozynski2022-04-291-1/+7
| | | | | | | | | | We want to use the correct bottom when using squishiness. As we cannot override `setLeftTopRightBottom` in QSTileViewImpl, we manually set it using the correct scale. Test: manual Fixes: 225405454 Change-Id: I9e6905a68fcb076842bb189bc75396067b6dfaa2
* Add better a11y support in QSFabian Kozynski2022-03-311-0/+9
| | | | | | | | | | | | | | | * Add ACTION_PAGE_LEFT/RIGHT to PagedTileLayout and proper focus after changing pages. * Add CollectionInfo to TileLayout and CollectionItemInfo to QSTileViewImpl to indicate the position of the currently focused tile. * Properly use ACTION_COLLAPSE/EXPAND in QSPanel/QuickQSPanel so the proper announcement is made, as well as the proper action is provided in the contextual menu. Test: manual Test: atest com.android.systemui.qs Bug: 204726862 Change-Id: I9bb085002c99e75ab0bb91f287ded62793b932bb
* Annotate com.android.systemui.qs with @NullableFedor Kudasov2022-01-071-2/+4
| | | | | | Bug: 209459024 Test: m SystemUI-core Change-Id: I48ba7039ca826c8304f425f34a8c84981710dc77
* Always have QS expanded on split shadeLucas Dupin2021-12-051-0/+1
| | | | | | | | Test: pull down qs from launcher, lock screen, from regular or split shade modes. Test: repeat tests pulling down with 2 fingers Fixes: 204450723 Change-Id: Ifea32b10378ed4cc240ea1a95bea12db515479bf
* Fix 2 finger pull down animationLucas Dupin2021-11-051-0/+7
| | | | | | | | | | | | | In order to animate smoothly when going directly to QS, and skipping QQS, we need to propagate the squishiness amount to the paged tile layout. Test: pull down shade, on split screen, landscape, portrait Test: pull down QS, scroll through pages Test: pull down shade with 2 fingers Test: atest QSSquishinessControllerTest Fixes: 204916761 Change-Id: I249e49a7b6c6ce1e9b6da28ab80ead771b962edc
* Only call layout during layout passLucas Dupin2021-11-011-4/+8
| | | | | | | | | | In other cases, let's just adjust the bounds, otherwise we'll conflict with the measuring pass, causing the width to be 0 after screen rotations. Test: manual Fixes: 204497727 Change-Id: I759f084577814ff1a4372f1d90cd05ce73604950
* Make QS buttons squishyLucas Dupin2021-10-261-3/+21
| | | | | | | | | | Pass squishiness fraction from notifications to QS, and make it behave accordingly. Test: manual Test: atest QSSquishinessControllerTest Bug: 199047412 Change-Id: I9f5df7ae99e0bced4626dcb36053c9dba78ec672
* Fixed the padding of quick settingsSelim Cinek2021-07-211-4/+1
| | | | | | | | | | | | Quick settings was accounting for double the padding / or not enough in most cases. The padding is now only on the quick settings itself and the various workarounds in the build are reverted. Media and the horizontal layout would obtain negative margins for example, which where just cancelling themselves out. Fixes: 192937466 Test: add media / no media, observe proper 24dp padding below Change-Id: I635afaaf9185c32a9f04851453ac7c0d20612c11
* Remove last row bottom padding in QSFabian Kozynski2021-07-021-0/+5
| | | | | | | | | | The last row in QS should not have padding, as its followed by the pagination row of the footer that has some padding (but the last one in QQS should). Bug: 189982925 Test: manual Change-Id: I7b87539a14b9c6c4132cf9d8fee48e9bcc49a7e7
* Fix margins between headers and tiles.Fabian Kozynski2021-05-191-11/+4
| | | | | | | | | | | | | | | | Also: * Remove old classes. * Change height of tiles. * Add back clipping on PagedTileLayout, as the views don't need to go outside its bounds. * Fix a scrolling issue Fixes: 187460996 Fixes: 187966021 Fixes: 187334034 Fixes: 188459321 Test: manual Change-Id: Ide520f26982a3f2c8918424cb4c14d3d14da3724
* Fix sizes and paddingsFabian Kozynski2021-03-241-3/+9
| | | | | | | | | | | | | | Fix size of brightness slider. Also, align margins with notifications in: * QQS * QS * QSCustomizer * Brightness slider Test: manual Fixes: 183391158 Change-Id: I31a3b7f8d42186f2d2699f2fba71ee0dcc335bf9
* Animate appearing tiles in QSFabian Kozynski2021-03-101-1/+1
| | | | | | | | | | The appearing tiles get expanded from 0 to the final height. Their top moves following the other expanding tiles so it looks like they come from a coherent surface. Test: manual Bug: 181673785 Change-Id: Ib4492190b53afccd8c3071070d7adf29eb1ed6ed
* Bring tiles sizes and animations up to specFabian Kozynski2021-03-101-1/+2
| | | | | | | | | | | | | | This CL updates the following: * Tile height (QQS and QS) * Tile margins (QQS, QS, and QSCustomizer) * Animation between QQS and QS * Single line for main label, secondary label * Corner radius * Label text size Test: manual Bug: 181673785 Change-Id: I8f2fb5929474b0493af33d8fa415353152a27c17
* Dismantle remove labels prototypeFabian Kozynski2021-02-261-15/+4
| | | | | | Test: manual Bug: 171319433 Change-Id: I1ea97cec5c0d9b559213ca2adb9ddf7af60229a6
* Change QQS to use tiles with side labelsFabian Kozynski2021-02-251-0/+1
| | | | | | | | | | | | | | | | | | * 2x2 in portrait, 1x4 in landscape * 4 columns in landscape QS Other fixes while changing this: * Animations between QQS and QS look better * Fix alignment of tiles labels * Improve line logic for labels Test: manual Test: atest SystemUITests Bug: 171319433 Bug: 180632445 Fixes: 180472943 Fixes: 180191343 Change-Id: I67fbe27796461bee7d2364f81b47f2efd31e4b41
* Flags for qs labelsFabian Kozynski2021-01-261-3/+1
| | | | | | | | Test: atest SystemUITests Test: manual Fixes: 178390389 Change-Id: If7c6371ccd58b49cec0e9fdedc2bbbb120e4788e
* Prototype tiles with side labelsFabian Kozynski2021-01-071-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches the tiles in QS to have the labels on the side, and display in two columns. Implemented: * animation in expansion interleaves the tiles from QQS into QS, so the first half of QQS moves to the left column * Tapping on the label has the same effect as long pressing Not implemented: * animated shape between QQS and QS * Edit screen Landscape with media has a bug where scrolling pages resets to first page. Also, animations in landscape with media don't look great. To enable: adb shell settings put secure sysui_side_labels 1 (0 to disable) and restart SystemUI Test: manual Test: SystemUITests Change-Id: I7468bc2c0b81e99a2de235a3b4312e678e968fd2
* Prototype remove labels in QSFabian Kozynski2020-12-141-8/+26
| | | | | | | | | | | | | | | | Add flag to not show labels in QS. This also makes it show more rows. Added a switch in customizer to toggle the setting. Some visual issues when toggling (media player), fixed by collapsing and reopening QS. In user builds, can be toggled with: `adb shell settings put secure sysui_remove_labels {0, 1}` Test: manual Change-Id: I750c53d918b2d9590ff86eed67d1932444390828
* 11/N Remove UIEventLogger from QSPanel.Dave Mankoff2020-11-181-1/+6
| | | | | | | | Removes UIEventLogger injection from QSPanel constructor. Bug: 168904199 Test: atest SystemUITests Change-Id: I2099ed36c6ba09968da2bc2de1cba23318282573
* 5/N Move QS Tile tracking logic into QSPanelControllerBase.Dave Mankoff2020-10-191-1/+1
| | | | | | | | | | | | | This is a big, sort of hairy CL, but is a big push to completing this series. One notable thing you see happen here is a lot less calls to methods liks "setHost" which late-bind various member variables. Classes such as QSTileHost are available to be injected at constrction time and this CL starts taking advantage of that, removing the need for a lot of null checks. Bug: 168904199 Test: atest SystemUITests && manual Change-Id: Ib4768d10e26debdea8d43daee61d2501ed250e67
* Changed the landscape experience of quick settingsSelim Cinek2020-06-121-10/+36
| | | | | | | | | | | | | | | | | | | | | | When introducing Media into quick settings, the landscape experience never really worked well. The music player would be cut off on the bottom and users could never reach their playback controls. Instead of the vertical layout, we're now rendering quick settings side by side with the player. Using some densities, this could still be too large, so we're also introducing a scrollview for the expanded quick settings. This also makes sure all the paddings and spacings are up to spec. This also fixes behavior where a user could still collapse the panel while the user switcher was showing. Bug: 154332040 Test: atest SystemUITests Change-Id: I3b8babc2cc6a91e19824b67f043aa5044dc370b9
* Updated the paddings of quick settings to match notificationsSelim Cinek2020-06-011-3/+2
| | | | | | | | | | | | | | | | | Now all content is nicely aligned on the same line like the notifications. Previously this was a mix of statusbar alignment and some other alignment, that sometimes worked out to actually be at the same location. The setting of these paddings is now streamlined in code. This also ensures that the buttons themselves now nicely align on the left side of the view instead of being 1dp off. This also fixes a bug where the paddings were off due to the last media refactorings on Pixel 2 or non-rounded displays. Fixes: 156452277 Bug: 157258041 Test: test layout of Qs with and without media notification, with various cutouts. Change-Id: Id547f9a99577886522e41bdb7e3aedac47db9a9e
* Add new QS Ui EVentsFabian Kozynski2020-04-301-1/+1
| | | | | | | | | | | | | | | | | This CL adds events for: * QS interactions * StatusBarState changes * User Switcher interaction * DND panel interaction The new QS events that refer to particular tiles attach the following: * spec (if framework tile) or package (if CustomTile) * instanceId associated with the QSTile object on creation Test: atest SystemUITests (including new tests) Test: manual using statsd_testdrive Fixes: 147508235 Change-Id: I43d8fe1fdb2aec1f16032da61a599ebc29809afc
* Wait to reorder players, visual updatesBeth Thibodeau2020-02-031-1/+4
| | | | | | | | | | - Wait until QS is not visible to reorder media players - Move media players to top/left - Update layouts for current designs - reduce number of tiles in QS when media flag is enabled Test: manual, screenshots at https://drive.google.com/drive/folders/1aLsTJaOuYTdZOo3XFtWsLyvN7UALHyz3?usp=sharing Change-Id: Ibd5289d3a5fe18bbdde63141d9ef4f247b261836
* Prototype less rows in QSFabian Kozynski2019-10-101-0/+7
| | | | | | | | | | | This reduces the max number of rows specified in config by 1. To enable: adb shell settings put system qs_less_rows 1 and then turn on/off Dark Theme to recreate QS Test: manual Change-Id: Ia6be4df14b9fbd1956cede73ada7de81363992fb
* Fix TileLayout#onMeasureFabian Kozynski2019-05-081-1/+1
| | | | | | | | | | | | | The width value for setMeasuredDimension was wrong, as it was adding the padding, which was already included as this is the width we get from the parent. This caused each TilePage in PagedTileLayout to be 8dp wider than the container and then they overlapped at the edges, appearing in the next page. Test: visual using showLayoutBounds Test: manual using Talkback, previous page not focused Fixes: 132048870 Change-Id: Idd5d4567cfe25dd1e11a02995286a29606eac6e0
* Change how PagedTileLayout is measuredFabian Kozynski2019-04-181-1/+2
| | | | | | | | | | | | | | | | | | | The change makes PagedTileLayout only use excess space from QSPanel after other views have been measured and the padding has been accounted for (see LinearLayout#measureVertical). PagedTileLayout caches the last height to be measured so as to minimize the number of times the number of rows is recalculated (and prevent loops). Also, fixed the calculation in TileLayout#updateMaxRows to match the height calculation in TileLayout#onMeasure. Test: manual, stress testing with multiple pages, adding and removing tiles, starting and disconnecting VPN, changing display size Bug:122714773 Change-Id: I5c85f03cfc79e341244d213fd92307821db80889
* Fixes wrong measurements on QS animationFabian Kozynski2018-10-091-2/+4
| | | | | | | | | | | | | | Clipping of PagedTileLayout is done independent of padding so no measurement corrections are needed. Padding in TilePage fixed so the pages are centered (they use all the width). FrameLayout in qs_paged_tile_layout removed as not used. Change-Id: If8cd95855ebcddf533e87b9203c4ee3d831bdf2c Test: atest && visual Fixes: 117452733 Bug: 117401270 Bug: 117096186
* Fix clipping on scrolling QS PanelFabian Kozynski2018-10-011-2/+1
| | | | | | | | | | QS Panel paged view now clips to its padding. Pages are horizontally centered. Test: runtest & Visual Change-Id: If35b8d6f4c44cb0c425efa6e8f6aa92a8cfa0c75 Fixes: 117096186
* Refactor PagedTileLayout to not overflow screenFabian Kozynski2018-09-201-4/+36
| | | | | | | | | | | | PagedTileLayout respects MeasureSpec mode for height to decide on how many rows to show. TilePage and PagedTileLayout only show as many rows as they can up to the height of the screen. TileLayout can calculate the maximum number of rows given a height limit. Fixes: 113082314 Test: Visual, atest Change-Id: I2860d71c9aeb2a8ac62fcdbc71a3041a91605bcb
* Refactored layout of QQS and transition animation.Fabian Kozynski2018-09-071-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | QuickQSPanel.HeaderTileLayout is reworked to work in displays of different densities by inheriting from TileLayout. The maximum number of tiles shown is still determined by the same parameter, but it can show less tiles if there is not enough space due to low density/small screen. This is calculated during onMeasure using the available space. QSAnimator is modified to accomodate the following three cases: * If the tile is present in QQS and QS, animate as before. * If the tile is present in QQS and not in QS, fade translate to right. * If the tile is not present in QQS and is in QS, fade in from the right. This is a new upload of ag/4898401 (reverted in ag/4968215), addressing b/113994014. Fixes: 80141553 Fixes: 110404680 Test: Visual, different densities and orientations. Tested battery saver tile. Change-Id: Iffb7a45df7d20e67beb9c75b6f71b3bbc7c49b7d
* Revert "Refactored layout of QQS and transition animation."Fabian Kozynski2018-09-071-19/+6
| | | | | | | | | | This reverts commit 40c9f0d7a562655c5d2e5aaf234e15d9c6056689. Reason for revert: introduces b/113994014 and b/114300041 Fixes: 113994014 Fixes: 114300041 Change-Id: I435323e6cf013806d1de4dc06d4a8b602ebfbf25
* Refactored layout of QQS and transition animation.Fabian Kozynski2018-08-311-6/+19
| | | | | | | | | | | | | | | | | | | | QuickQSPanel.HeaderTileLayout is reworked to work in displays of different densities by inheriting from TileLayout. The maximum number of tiles shown is still determined by the same parameter, but it can show less tiles if there is not enough space due to low density/small screen. This is calculated during onMeasure using the available space. QSAnimator is modified to accomodate the following three cases: * If the tile is present in QQS and QS, animate as before. * If the tile is present in QQS and not in QS, fade translate to right. * If the tile is not present in QQS and is in QS, fade in from the right. Bug: 80141553 Bug: 110404680 Change-Id: I7be192b9ad6e66f97b3041bd8d5ac57ad71e6fdd Test: Visual, different densities and orientations.
* Fix RTL TileLayout.Amin Shaikh2018-05-011-12/+6
| | | | | | | | | Ensure QS tile columns are symmetrical for LTR and RTL layouts. Also ensure that opening QS customizer does not shift tile positions. Change-Id: I647e5af41ed505ed01420d8b735652bd80a1661e Fixes: 79110384 Test: visual
* Allow left-right swiping from edges in QS.Amin Shaikh2018-04-161-2/+2
| | | | | | | | | Apply notification side margins to all children in QSPanel except for the tile layout. Update TileLayout to respect padding. Change-Id: Ic6f8f2859d3a130fd4640ae915c9614240fd1c19 Fixes: 78108576 Test: visual
* Update QS edit layout.Amin Shaikh2018-03-301-1/+3
| | | | | | | | | | | | - Update TileLayout to lay out tiles rows in a similar fashion to LinearLayout. - Update edit screen layout to show rounded corners, margins, and ensure that QS tiles line up with the tiles in QS. - Show QS status bar header above the edit screen. Change-Id: I6c8d644787bf1875ad0d7ad056e9909dc4919ce4 Fixes: 36076720 Test: visual
* Nit cleanup: Update TileLayout.onLayoutRohan Shah2018-03-091-9/+17
| | | | | | | | | Made it a little easier to read onLayout/onMeasure. Separating this from landscape CL just to keep a minor cleanup separate. Bug: 73808887 Test: Visually Change-Id: I817d6c92cda37ee0d99cd20ace06959a3bdc608d
* Implement QS spec.Amin Shaikh2018-02-271-7/+9
| | | | | | | | | | | - Update padding between QS tiles - Add margins in the QS header for larger width devices - Update carrier text length in QS footer and fix animation overlap - Fix TouchAnimator to linearly interpolate more than 2 keyframe values Bug: 73312177 Test: visual Change-Id: I8da031437fc78ef1fb86797237711ac92a860616
* [QS] Add header tooltip for long pressRohan Shah2018-02-211-1/+5
| | | | | | | | | | | | | | | | | Added some hooks in animator to pass along expanded/animating/collapsed state in a more clear manner. Added tooltip view with the teaser text to animate in at the top of the view (and fade out either when we start animating or automatically after 5 seconds). Added prefs for tracking how often tooltip is shown/hiding it based on that number. Updated dimensions for correct spacing (based on redlines). Test: Visually Bug: 72528203 Change-Id: I70e4654ed95057fac6d8dbb890d575c2a5d9f215
* Merge "Revert "[QS] Add header tooltip for long press""Evan Laird2018-02-161-5/+1
|\
| * Revert "[QS] Add header tooltip for long press"Evan Laird2018-02-161-5/+1
| | | | | | | | | | | | | | | | This reverts commit 22caf078e493ff49e021a8f5af80ac10d4926feb. Reason for revert: Quick settings is no longer expanding properly. Reverting this fixes it Change-Id: I63b82e948316726067214b088016661785982e3a
* | Merge "[QS] Add header tooltip for long press"Rohan Shah2018-02-151-1/+5
|\|
| * [QS] Add header tooltip for long pressRohan Shah2018-02-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added some hooks in animator to pass along expanded/animating/collapsed state in a more clear manner. Added tooltip view with the teaser text to animate in at the top of the view (and fade out either when we start animating or automatically after 5 seconds). Added prefs for tracking how often tooltip is shown/hiding it based on that number. Updated dimensions for correct spacing (based on redlines). Test: Visually Bug: 72528203 Change-Id: Ided991da43fbede43c84c53ef22688d21aabe291
* | Do not allocate a hardware layer for TileLayout.Amin Shaikh2018-02-071-0/+5
|/ | | | | | | | | | | | | This was a regression introduced by ag/3429142 which replaced the usage of PagedTileLayout with TileLayout in QS. PagedTileLayout#hasOverlappingRendering was overridden to return false, but TileLayout did not have the same optimization. Since QSAnimator animates the alpha of this layout, a hardware layer was allocated unnecessarily, potentially causing jank in the QQS <-> QS animation. Bug: 72632226 Test: visual and using "Debug GPU overdraw" and "Show hardware layers updates" Change-Id: Idfa8eeac0b63ae03942cccd59b52657ab263427f
* QS: Fix brightness/edit disappearing with too few tilesJason Monk2017-02-061-2/+3
| | | | | | | | - Make sure the tile layout doesn't have negative height Test: runtest systemui Fixes: 34593873 Change-Id: I392aa925cde1b2147a86cda63cd9e84cd3026a90
* QS: Only put visible tiles in listening stateJason Monk2016-06-021-0/+15
| | | | | | | | | | - Make it so the QSPanel doesn't listen until expansion starts - Push listening state through the TileLayout - Make PagedTileLayout only listen for visible pages - Push setListening onto background thread Change-Id: Id7c008c9447f9a5dac69469fef72bc580f423b0c Fixes: 28962155