Commit Graph

117 Commits

Author SHA1 Message Date
Sunny Goyal
802f3255a7 Updating the folder cell dimensions to be closer to a square
am: 68f240eb54

Change-Id: I68047a8eba8b3a0c8117fedbc45b6100dd04b023
2016-10-10 21:17:28 +00:00
Sunny Goyal
68f240eb54 Updating the folder cell dimensions to be closer to a square
Bug: 31813976
Change-Id: I05d7520daee28a310ff122deaf265951e454d21e
2016-10-07 13:36:56 -07:00
Jon Miranda
aca2145f2a Restore AllAppsContainerView UI to match spec.
Did some refactoring with Sunny's help.

Change-Id: Ie4c90c316f1e381829836e11c83eaaedfed4d621
2016-09-26 16:45:10 -07:00
Sunny Goyal
baec6ffae2 Updating the paddings in folder cell
> Updating overall padding for the cell and adding drawable padding
> Ensuring that the folder cell is always rendered properly based
  on available vertical space

Bug: 30605958
Change-Id: I8ceb9fea5a25052b0d7461f52edca0e6a33fa085
2016-09-16 12:05:02 -07:00
Hyunyoung Song
016eaeea99 Change all apps caret target bounding box
b/30400751

1) This also fixes the issue of apps drawer sliding up when page is swiped
horizontally immediately above the hotseat area.

2) Disclaimer: this should be cp'ed to calgary.
Hence, I tried to keep the diff small. Ideally, CaretDrawable animation
handling should move to AllAppsHandleImageView via refactoring in
follow up CL.

Change-Id: I4d808ee2eeca53b40c0b4e4e0e364fef056e26c3
2016-09-07 14:45:09 -07:00
Hyunyoung Song
9d96fd5790 Landscape container padding update.
b/30021487

Change-Id: I179825eba09f3c4c57175e8f6da49708dae1931c
2016-08-23 11:06:24 -07:00
Winson
fadbe8ffbd Fixing regression in folder positioning.
- When we had the search bar, the workspace padding always 
  accounted for the search bar (and therefor drop target bar) height
  when the folder opened.  Now that there is no padding on the top, we
  should offset the bar whenever possible to ensure that the drop target
  bar is visible.

Bug: 30110595
Change-Id: Ia9a8581981c777f2507b6bd880994a3dcfd52c39
2016-07-23 01:15:08 +00:00
Winson
6231ede10c Matching hotseat to spec.
- Fixing regression in hottest folder background getting clipped
- Ensuring that the padding is correctly applied in vertical bar layout
  to match workspace

Bug: 30021487
Change-Id: I09bce21829867f4bd4e50646e565959421e4984c
2016-07-20 17:21:55 -07:00
Winson
11439c5854 Fixing small regressions from layout tweaks
- Ensure that the caret is the right height
- Ensure that the workspace page spacing matches the workspace padding,
  but just offscreen

Bug: 30021487
Change-Id: Iaf4b33db0f6456b74986638fb6b6af78fc6e1859
2016-07-20 22:09:57 +00:00
Winson
1f06427266 Initial changes to tweak layout.
- Adding DeviceProfile callback for when the launcher layout changes due
  to insets.  This is necessary since there are now different layouts
  depending on which side the navigation bar is on
- Consolidating hotseat and other layout into the device profile 
  launcher layout logic
- Making the all apps icons match the workspace icon height
- Tweaking caret drawable to draw to the bounds specified to simplify
  layout in each orientation
- Fixing minor issue with page indicator shifting in landscape
- Centering overview buttons to the workspace page

Bug: 30021487
Change-Id: I1866bce00b2948f3edd06168c0f88d81207e3f13
2016-07-20 10:17:08 -07:00
Sunny Goyal
6178f13e2d Moving the QSB out of the cell layout to the Drag layer
This allows better edge matching for the QSB. The QSB position
is kept synchronized with the page scroll and all-apps transition.
But its not visible in spring loaded and overview mode

Change-Id: I4e6723607ea966ee672273a9ca67c792fd6b5661
2016-07-13 12:37:08 -07:00
Sunny Goyal
6c2975e7e3 Adding support for non-zero left insets
Bug: 29613069
Change-Id: Ifdf9bcce7ecdedc510f3be8a4dc10eb8da7c4bf1
2016-07-07 16:54:58 -07:00
Hyunyoung Song
7d2fc8120e Add caret shaped all app pull up handle to page indicator.
b/28917826

> PageIndicator is also added in landscape
> Touch delegate allows the active touch area to be 36dp

Change-Id: If00f45fc88a13cd5a6759d771313439eb58561e3
2016-06-15 12:51:30 -07:00
Sunny Goyal
47328fd53f Removing the SearchDropTarget bar as it no longer contains the QSB
> Renaming it to simply DropTargetBar
> Moving AppInfo to the top bar as well
> The workspace pages will extend to the top edge (minus some padding).
Since the QSB is no longer displayed on top of every page, there is
no reason to reserve the space.
> In spring-loaded mode, the workspace cell layout will scale enough
to make room for the drop target bar at the top

Change-Id: I2baf607310335dd576c9d9fcbb75ab708f47ac03
2016-06-06 16:15:46 -07:00
Tony Wickham
f549dab31d Add PageIndicator interface and custom PageIndicatorLine view.
- The current PageIndicator has been renamed to PageIndicatorDots
  and PageIndicatorMarker has been renamed to PageIndicatorDot.
- PageIndicatorDots and PageIndicatorLine implement PageIndicator.
- PageIndicatorLine uses scroll progress and number of pages to
  draw a line of the correct size and position.
- All of these page indicator files are now in a pageindicators package.

Bug: 27227498

Change-Id: I9230d2e0600ce583989bd31d0b0e252b148d15c2
2016-05-17 18:53:57 -07:00
Sunny Goyal
e27815e33f Fixing wrong method name
Change-Id: Idabe5d8ee41f31d30dcbe03aa626f7b39f713c14
2016-04-04 17:51:04 -07:00
Sunny Goyal
13178ac822 Adding an upper bound to all-apps width on larger devices
Change-Id: I16a0d8fb7c5023045d0a6b9e8089e0ab6a476d6d
2016-04-04 16:35:47 -07:00
Sunny Goyal
f37a21412a Defining separate layouts for horizontal and vertical drop target bars
instead of chaning the layouts in DeviceProfile

Bug: 27721989
Change-Id: I9a22c21e643f4fd0058c9be5e9d705aaf7649204
2016-03-24 17:29:23 -07:00
Adam Cohen
efca0279eb Switch all folder preview rendering to be programmatic (ie. no assets)
-> Refactored the preview background rendering to be much more self-contained.
   This cleans up a lot of code in the CellLayout, and keeps the logic in the
   right place.
-> We switch to software rendering for performance and compatibility reasons.
-> Removed all assets.
-> FolderIcon accept animation includes animation of the clipped region.
-> 1:1 hand-off of drawing of the FolderIcon background between the FolderIcon
   and the CellLayout. Unfortunately, CellLayout rendering is still required
   to work around clipping issues (due to use of software layer). We also
   need this to support folder creation feedback.

Change-Id: Ib8f7fa6359dfedff8145f38dd50ba03849ca0d51
2016-03-03 09:24:45 -08:00
Sunny Goyal
775d4c9ac0 Merge "Setting content bounds in onMeasure as it uses measuredWidth, which might not be available during onCreate" into ub-launcher3-burnaby-polish
am: 5df98da8fd

* commit '5df98da8fd2c1997bd6c09a4772f018730345090':
  Setting content bounds in onMeasure as it uses measuredWidth, which might not be available during onCreate
2016-02-17 02:03:05 +00:00
Sunny Goyal
94f46d9e5f Setting content bounds in onMeasure as it uses measuredWidth, which might
not be available during onCreate

Also fixing the calculation of allApps column could, which was counting an
additional icon gap

Bug: 27173894
Change-Id: I8be8cccc76d7e7d945cf9383567a3026228b6c86
2016-02-16 15:24:14 -08:00
Adam Cohen
f9c184a619 Refactor FolderIcon to separate the preview effect into it's own class
-> Created com.android.launcher3.folder package to house most folder-related files
   (aside from the FolderInfo) which is more related to the model than the UI.

Change-Id: I767063e1e4c775c01a799a3bede30cd94ac48ade
2016-02-12 17:28:31 -08:00
Tony Wickham
e0c3323656 Tweak spring-loaded workspace.
- No page indicators in spring-loaded mode
- Don’t move workspace up as high
- Scale workspace at 90% instead of 80% on phones
- Increase speed of workspace -> spring-loaded -> workspace
- Widgets were being scaled down twice when dragging from widget picker
- Don't scale up icons when dragging (scaling other stuff down is enough)
- Make scrim less dark and panels more transparent
- Thin white border around page instead of highlight when hovering

Change-Id: I963e91c20d4c0340480d165e0f3b8064783c0cb2
2016-02-08 11:37:19 -08:00
Tony Wickham
c32c63c46e resolve merge conflicts of b9759d399b to ub-launcher3-calgary.
Change-Id: I66230c15e5eaeef316d4e2f14b85c6ff1b6e977d
2016-02-01 14:51:35 -08:00
Tony Wickham
8a75806c1a Add extra space for the search bar.
Also fixed a broken test.

Change-Id: I1c270e69617528ea30f0e26a2101673e9b9fa63c
2016-02-01 14:15:37 -08:00
Sunny Goyal
38e7f28d3f resolve merge conflicts of a50a419b82 to ub-launcher3-master.
Change-Id: Ie0e233e22284b8ddd2dbb86204e042651b6dfae2
2015-12-11 14:18:16 -08:00
Sunny Goyal
a50a419b82 Restarting launcher when on font scale change
Chaning the font scale affects the static device profile and may
affect various background threads and static constants. Killing
the process ensures that these states get invalidated properly.

Bug: 26131935
Change-Id: Idc262ee5d158019e7a2505f8fb9a6413c06bfdeb
2015-12-11 10:55:20 -08:00
Sunny Goyal
258797318a Merge "Fixing All apps not respecting scaled icon size" into ub-launcher3-burnaby-polish
am: 49750ce75e

* commit '49750ce75e7413ad3c4fe4be31a2e1d73312794b':
  Fixing All apps not respecting scaled icon size
2015-12-10 17:52:01 -08:00
Sunny Goyal
383e0a29ec Fixing All apps not respecting scaled icon size
Change-Id: I3d05c713939fd69d04f5896cdc5db91480b0d4d1
2015-12-10 13:02:01 -08:00
Tony Wickham
ec73dd97f0 Revert "Revert "Reverting folder cell width on portrait phones.""
am: 6159c242bc

* commit '6159c242bc610f13e4c7550ae8b15f25603f4b23':
  Revert "Revert "Reverting folder cell width on portrait phones.""
2015-11-13 18:10:57 +00:00
Tony Wickham
6159c242bc Revert "Revert "Reverting folder cell width on portrait phones.""
This reverts commit 1974e98f5e.

Change-Id: I7c5d86de187989c085f676933ce3f1cbd57ed8a7
2015-11-13 18:07:18 +00:00
Tony Wickham
0309fbc65f Revert "Reverting folder cell width on portrait phones."
am: 1974e98f5e

* commit '1974e98f5ec4713e50ba64ec32a7607c92ddce9b':
  Revert "Reverting folder cell width on portrait phones."
2015-11-12 23:52:34 +00:00
Tony Wickham
1974e98f5e Revert "Reverting folder cell width on portrait phones."
This reverts commit b25e684a76.

Change-Id: Ie86adc4b35c73ab7ef78d73225b437adc4751172
2015-11-12 23:46:33 +00:00
Tony Wickham
79b4194765 Reverting folder cell width on portrait phones.
am: b25e684a76

* commit 'b25e684a766362422f5693f7a2189910c1275584':
  Reverting folder cell width on portrait phones.
2015-11-12 23:41:06 +00:00
Tony Wickham
b25e684a76 Reverting folder cell width on portrait phones.
The extra folder cell space added in ag/790800 looks bad on phones in
portrait mode, so reverting it here. However, we keep the extra space
on tablets or phones in landscape mode, since it provides more room
for long app names (bug 22462641).

Bug: 25662215
Change-Id: I2a37b884458ee557c9b8cff0c3edef16bfc50efb
2015-11-12 15:34:59 -08:00
Tony Wickham
5ea422e39e Added Gravity.CENTER_HORIZONTAL to drop target layout params.
I'm not sure if it is strictly necessary, but it is probably good to
be more explicit regardless.

Change-Id: Ib7647dbcb5449e22ef87da8d49b4e7804ba5c17f
2015-10-30 11:22:44 -07:00
Tony Wickham
c1ff24c077 resolve merge conflicts of a3c74d10a7 to ub-launcher3-master.
Change-Id: Ibeb2499ac278e4094a2922501cfffad2489e58ed
2015-10-30 10:37:43 -07:00
Tony Wickham
a3c74d10a7 Setting correct height for search bar widget options bundle.
- Seperate search bar height from its top and bottom paddings
- Report this height plus 8dps top and bottom for the widget options
- Use a separate bottom padding to adjust spacing between QSB and
  the workspace
- Add tests to verify the height of the search bar in both normal and
  tall modes (ran on Nexus 6, 7, and 10)
Change-Id: Ia7557785d1b38194eee869d0460456e8f33447d5
2015-10-29 12:18:28 -07:00
Tony Wickham
c1763b24fc resolve merge conflicts of 52040c2d51 to ub-launcher3-master.
Change-Id: Ie3cf72ef11b43e2c681d6d614c668062c7e7b74c
2015-10-23 12:29:44 -07:00
Tony Wickham
eef443248a Set search bar height before setting up views in Launcher.
This ensures that the QSB widget options are set correctly the first
time they are used.

Bug: 24704753
Change-Id: I2bb13ff012b6f13ca076deed61f0b08a7037e2fa
2015-10-21 12:20:31 -07:00
Tony Wickham
be424b2c32 am a295048a: Increase folder cell width slightly.
* commit 'a295048a69d35b5adc3f021c3d40c32700cc9629':
  Increase folder cell width slightly.
2015-10-12 23:25:24 +00:00
Tony Wickham
a295048a69 Increase folder cell width slightly.
The increased breathing room makes it more likely that long app names
will fit in the folder cells without being cut off.

Bug: 22462641
Change-Id: I110ede040f9e8fdddbf0c4e7a395ac71435559f3
2015-10-12 15:57:23 -07:00
Tony Wickham
a72f49cfc4 resolved conflicts for fa3c369c to ub-launcher3-master
Change-Id: I6bfc3d3b731a414060d86d4f1dfc5480c279edc9
2015-10-09 10:05:56 -07:00
Tony Wickham
3786092361 Merge "Added launcher callback to specify search bar height." into ub-launcher3-burnaby 2015-10-09 01:37:39 +00:00
Tony Wickham
72c689a7a2 resolved conflicts for d70a4b7b to ub-launcher3-master
Change-Id: Ib04f80eeebf551fc026925830fc4739d1c620513
2015-10-08 18:32:22 -07:00
Tony Wickham
55616cd363 Added launcher callback to specify search bar height.
The search bar can now be be normal or tall. When it is set to tall,
the hotseat and page indicators move down so that the workspace isn't
compressed quite as much.

Change-Id: Id92a946eab3a93524999f92efd847a501a95f002
2015-10-08 16:58:05 -07:00
Tony Wickham
d6b4037b09 Grid adjustments, specifically for Ryu.
> Less than 14% of the screen is used for left/right workspace padding.
  (To be clear, this means 7% for the left and 7% for the right.)
> Hotseat icons are the same size as workspace icons.
> Far left and right hotseat edges line up with workspace edges.
> All Apps button is scaled down 8dp.

Bug: 24003478

Change-Id: Idb057ab0f6ba29e7fd93feac7573ca2e07c7e839
2015-10-08 09:23:10 -07:00
Tony Wickham
439bc06dc0 am d47807d7: am 3a3517fb: Add widget size options for QSB.
* commit 'd47807d7a97d4ab555b2f9be882591c08955d699':
  Add widget size options for QSB.
2015-10-07 20:45:49 +00:00
Tony Wickham
3a3517fb6c Add widget size options for QSB.
Bug: 24704753
Change-Id: I3e16c1f67a67b08b3843f7f38312447bdfa6a91e
2015-10-06 13:07:23 -07:00
Tony Wickham
ab946a19d4 Flinging to the left deletes when in vertical bar layout mode.
This mode has the remove icon on the left side, so flinging to the
left makes more sense. But flinging up still works in either case.

Change-Id: I7ab40776b67659026f03f81efd43fae3375b5ba0
2015-09-16 16:28:43 -07:00