Commit Graph

19 Commits

Author SHA1 Message Date
Sunny Goyal
f076eae0ca Adding support for migrating the grid between any two valid screens sizes.
The grid is migrated in steps where each step consists of at max one column change and at max one row change.
Adding some unit tests for GridMigrationLogic

Bug: 25958224
Change-Id: Ie54e872ea0925cc4c463edbba0a7201d62b373a0
2016-01-20 11:58:09 -08:00
Sunny Goyal
643b87af42 Merge "Extending the grid migration logic to handle density changes" into ub-launcher3-master 2016-01-07 19:38:32 +00:00
Sunny Goyal
f862a26347 Extending the grid migration logic to handle density changes
For hotseat migratino, we simply drop the items with least weight
If the workspace row/column decreases by 2 or more, we clear the whole workspace

Bug: 25958224
Change-Id: I7131b955023d185ed10955f593184b9238546dc8
2016-01-06 10:16:44 -08:00
Sunny Goyal
96a0963c4a Adding support for negative x and y in layout xml.
Fixing default configurations for some screen sizes.

> Negative values for x and y are parsed as distance from end
column and row respectively. e.g.  (-1, -2) => (3, 2) in a
4x4 grid

Bug: 26110981
Change-Id: I4ca30e225ed6e2a31610ab23235d2cd10e8d317c
2015-12-18 17:17:08 -08:00
Sunny Goyal
fc21830e6b Normalizing app icons based on the standard icon guidelines
Bug: 18245189
Change-Id: Iaadcddbe3f966733a13b2e1fb60ba09a8b3aef9a
2015-12-02 19:46:36 -08:00
Sunny Goyal
9326461652 Adding margin to Drag layer instead of checking for right insets at every place
Bug: 25692432
Change-Id: I853f41a17c54b30b7772b9fd8556d9465de84752
2015-12-01 14:43:32 -08:00
Tony Wickham
d70a4b7b78 am d6b4037b: Grid adjustments, specifically for Ryu.
* commit 'd6b4037b093445fefa7d036da339dd549fae7a9b':
  Grid adjustments, specifically for Ryu.
2015-10-09 00:38:29 +00: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
Sunny Goyal
bbf0184603 Using 23 instead of Build.Versoin.M until the final SDK is available.
Change-Id: I9f8f6fe049afcd0ceb0797ddc803a2e77bab0437
2015-10-08 07:42:49 -07:00
Sunny Goyal
21d89fbf8c Merge "Fixing overscroll effect when the navigation bar is opaque" into ub-launcher3-burnaby-polish 2015-10-07 17:22:44 +00:00
Winson Chung
850de64c0d Merge "Fixing other missing cases of truncated sorts." into ub-launcher3-burnaby-polish 2015-09-30 00:06:55 +00:00
Winson
46a06da01c Fixing other missing cases of truncated sorts.
Bug: 24505761
Change-Id: I9b9358e8b134f0c4aac32ac536d9c8a1f0629957
2015-09-29 16:58:02 -07:00
Tony Wickham
58ecbe40f6 Flipped widths of Nexus 4 and Nexus 5 in InvariantDeviceProfile.
Without this change, Nexus 4 uses the Nexus 5 device profile and
vice versa. But because the profiles have exactly the same values,
it didn't matter that they were flopped.

Change-Id: I3fd788e040feb8de5bb5f5e336acbd4ac995dc0f
2015-09-29 15:19:32 -07:00
Sunny Goyal
0abb36f692 Fixing overscroll effect when the navigation bar is opaque
The navigation bar is opaque on mobile devices in landscape mode.
Launcher should ignore the right insets and draw the edge effect appropriately.
Also draw the black bar under the navigation bar, just in case we assume it
to be opaque, but it was not actually opaque.

Bug: 18526657
Change-Id: I1d49dcb82b8a5ee25009bc738cd9b8c0c5c88263
2015-09-22 10:57:08 -07:00
Winson Chung
2c6e5ccbcd Ensuring that we use the screen width more optimally in AllApps.
- Fixing issue with prediction bar height being calculated incorrectly
- Fixing issue where the prediction bar divider was not drawn exactly
  between the bar and the first row of apps
- Removing padding to allow scrollbars to reach full height

Bug: 20222023
Bug: 21335377
Change-Id: I2c0614a36e2294d0d6184a6bff4847876ffe971e
2015-06-05 09:49:12 -07:00
Sunny Goyal
53d7ee4285 Fixing different bitmap sizes in different orientations
> Using a single bitmap icon size
> Picking up appropriate density for satisfy the required icon size
> Fixing some icon size assumptions during icon animations

Bug: 19514688
Change-Id: Ia7a1d0d2c03a9d39ccc241fa4ae3eb8a0f374585
2015-06-03 19:07:44 -07:00
Hyunyoung Song
35c3c7f517 Start adding unit tests for the invariant device profile / Refactor
- removed redundant code to sort the device profiles
- removed DeviceProfileQuery class
- Added a helper method inside the test to easily generate
interpolation graph looks like:
https://docs.google.com/a/google.com/spreadsheets/d/1a1fdemrOqIDixiql77h0anWzUD3GlYfGsbP2FfIhyPM/edit?usp=sharing

Change-Id: Ia4c54a8d59a049c418c08d1b766f07ac6e1d0944
2015-05-28 15:33:40 -07:00
Sunny Goyal
c6205603ef Creating landscape and portrait device profiles at app initialization
Change-Id: Ide9d007adc36b348e19b05cdf49e87f8b02db60e
2015-05-22 08:46:41 -07:00
Adam Cohen
2e6da1539b Refactoring DeviceProfile
-> Pulling out the parts of device profile which can (and need to be)
   initialized and accessed without access to an Activity context,
   ie. the invariant bits.
-> The invariant bits are stored in InvariantDeviceProfile which is
   initialized statically from LauncherAppState.
-> The DeviceProfile contains the Activity context-dependent bits,
   and we will create one of these for each Activity instance, and
   this instance is accessed through the Launcher activity.
-> It's possible that we can continue to refactor this such that
   all appropriate dimensions can be computed without an Activity
   context (by only specifying orientation). This would be an
   extension of this CL and allow us to know exactly how launcher
   will look in both orientations from any context.

Sets the stage for some improvements around b/19514688

Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
2015-05-21 16:16:40 -07:00