Commit Graph

23 Commits

Author SHA1 Message Date
Sunny Goyal
89d5c5a31b Updating fast scrollbar UI in Landscape
Creating a separate view for FastScrollBar and moving all the relavant logic in
the view.
For protrait, the touch handling is delegated by the recycler view just like before.
For landscape, the dcrollbar does not overlay with recyclerView and handles the touch
itself

Bug: 37015359
Change-Id: Ie1981326457ba739bdf0ac8063db1065f395f133
2017-06-26 14:56:36 -07:00
Sunny Goyal
1a8f6fb736 Updating the fast scroll bar UI
Bug: 37015359
Change-Id: Iec0748f04ebe9a3eef13ff759da3cab6ff28c3a1
2017-06-16 14:57:34 -07:00
Sunny Goyal
9e4c359054 Adding utility method to temporarily hide scrollbar
Bug: 37616877
Change-Id: I286493746c44ace8958ffd8df24317125b445cf7
2017-06-07 14:05:48 -07:00
Sunny Goyal
dc19a07aba Adding support for top padding in BaseRecyclerView. The scrollbar is
drawn below the top padding.
Also adding callback for getting the all-apps vertical pull range
so that it can be controlled by SearchUiManager

Bug: 37616877
Change-Id: Ib4642073f3e92f6676caede3bddd652fda89c86f
2017-05-15 14:14:04 -07:00
Sunny Goyal
161f96bc77 Moving apps search related logic into a custom layout file
This will allow derivative projects to easily change the search behavior
by simply overriding the xml file

Bug: 37616877
Change-Id: Ib8d6a2dab06819a52611e9a3d97c70c5a49bbf97
2017-05-08 14:43:32 -07:00
Sunny Goyal
00e106880d Removing unused background padding from base recycler view
Change-Id: I36f68a143df8f3668074b3539aa9af170a91e511
2016-10-18 21:36:29 +01:00
Sunny Goyal
2a65020da1 Removing the section break UI support
This was an exploration for an alternative UI in all apps, where we
show section headers before every section. This was never released.

Change-Id: I2d36f1d078cc9a6f3ba6f0ec9655412182c9b016
2016-10-13 09:39:36 -07:00
Sunny Goyal
5d9fb0e92f Simplifying fast scroller logic
> Using a separate view for drawing the popup. This allows us to use elevation
  property instead of drawing the shadow as bitmap.
> During the thumb animation, invalidating the full track width, instead of
  invalidating the track and thumb separately.
> The thumb path is calculated at 0,0 and drawn using canvas.translate().
   This avoids recalculating the path on every scroll.

Change-Id: I48741e5b4432df0d939016db284d7aaf52cc2aa6
2016-10-10 14:17:16 -07:00
Peter Schiller
2e22b5d2de Fixed header elevation shadow on rotate
Change-Id: I1a4b55cf9af67d93e56d84378036c0061b6e8104
2016-07-13 01:06:09 +00:00
Winson
e8eaa9c94c Ensuring that fast scrolling to predictions scrolls list to the top
- Fixes a long standing issue with fast-scrolling to the predicted apps
  not quite scrolling the list to the top of the screen.
- Fixes an issue where we don’t scroll exactly to the fast scroll 
  position due to rounding
- Also fixes a small issue where the thumb would not update when the 
  fast scroll popup was no longer showing, even while dragging.

Bug: 30023608

Change-Id: I6b5080c6aea521ff03dca24317f0405c02725061
2016-07-13 01:04:56 +00:00
Winson
b655b88500 Cleaning up scrollbar logic to properly calculate stable extents.
- Removing old logic which assumed that views were the same size,
  especially now we can have variable dividers, etc.
- Simplifying old scroll position logic.
- Removing unnecessary prediction icon layout (same as normal icon)

Bug: 30023608
Change-Id: I39e1126fa586a76a9bdd3ff38cd6e360ac3021e6
2016-07-12 12:16:26 -07:00
Peter Schiller
c2a20ff0a8 Consolidate all the dividers to provide same look and feel
Bug: 30017936
Change-Id: I072cb116dba1df555a63f3f67b730f7f9c3a235a
2016-07-08 15:02:03 -07:00
Winson
c088049113 Highlighting sectioned apps on fast-scroll.
- This CL fixes an old assumption we had about the height
  of rows in AllApps, and ensures that we account for the
  difference in height between the predictive icons and the
  normal icons.
- In addition, we refactor FastBitmapDrawable to have multiple
  states, which it manages in drawing itself, including the
  press state and fast scroll focus states.  And we also refactor
  some of the fast scroll logic in the all apps recycler view
  out to its own class.

Change-Id: I1988159b2767df733bbbfc7dc601859cde6c9943
2015-09-28 17:32:19 -07:00
Winson
646c236ad2 Disabling fast scroller when searching apps.
- There is no meaningful order for the app search results since they are ranked.

Bug: 23759082
Change-Id: I0aa4eea68136ea3ecef2a80b20ba7b0d46f0653b
2015-09-03 18:49:43 +00:00
Winson
d2eb49e4c3 Tweaking fast scroller to follow touch closer.
- Issue: The fast scroller currently does not follow the touch input
  because fundamentally, the fixed scrollbar height and the mapping
  of the scroll space to the scrollbar space is fundamentally incompatible.
- This CL changes the fast scroller to allow it to detach when the user
  fast-scrolls, then re-attaches after the user scrolls the screen and
  the current scroll position for the scrollbar picks up the thumb position.
- Since the scroll position and the fast scroller thumb is now detached,
  we can change the distribution of the fast scroll letters to make it
  independent of the rows for each section and instead uniformly distribute
  it along the scrollbar, which allows for more stability.
- There are edge cases where this fails, especially when there are few
  apps, which we can investigate further.
  
Bug: 20035978

Change-Id: I8322f862107e6f330deff692885233706564bffd
2015-08-20 19:25:48 +00:00
Winson Chung
b1777447d9 Refactoring fast scroller.
- Fixing issue with fast scroller not fitting name width.
- Refactoring fast scrolling/scroll bar code out of base recycler view
- Adding animations to fast scroller to match design
- Smooth scrolling when jumping between app rows
- Fixing issue with fast scroller jumping when you first pick it up
- Fixing issue with wrong background paddings being used

Bug: 21874346
Bug: 22031923
Change-Id: I9f011b1f375751f437604b900e95a2942d3f4601
2015-06-23 14:24:15 -07:00
Winson Chung
fbc5b18626 Refactored section names to only draw when there is space.
- This CL removes all space for section names in both phones
  and tablets.  And when there are no section names, the layout
  will automatically fully merge the sections.

Bug: 20222023
Change-Id: Ic7c751d86f095e5cbd690bfd4f94bb5b00ff8ae4
2015-06-16 00:55:02 +00:00
Winson Chung
c332934e27 Merge "Refactoring all apps search to support external search bar." into ub-launcher3-burnaby 2015-06-15 22:43:55 +00:00
Winson Chung
ef7f874a88 Refactoring all apps search to support external search bar.
- Adding support for an external search bar that can be used
  to search a container view.  This adds a new interface
  AllAppsSearchController which manages the external search
  bar.  Each controller will have its own search implementation
  which means that we no longer need a common AppSearchManager
  interface.
- Removing elevation controller as we no longer have a builtin
  search bar in all apps
- Refactoring container view insets so that they behave
  the same in all containers.
- Refactoring apps view to ensure that we only update the number
  of columns with the available width
- Cleaning up LauncherCallbacks interface

Bug: 20127840
Bug: 21494973

Change-Id: I710b8e18196961d77d8a29f0c345531d480936fe
2015-06-15 14:22:47 -07:00
Winson Chung
4b9f979147 Fixing regression in fast scroller animation.
- Fast scroller was not fading out since we were missing the getter
  for the fast scroller alpha (so the initial alpha to animate from
  was wrong).

Change-Id: I2fd13eee3deb084ba37cf4a849e2378f23758391
2015-06-12 18:02:52 -07:00
Hyunyoung Song
ec84728b27 Consistent scrolling experience for All apps and widget tray
b/21375339

Change-Id: I8362b3ca94b7c4e75932d42cd09a989e0e3919c0
2015-06-04 11:37:46 -07:00
Hyunyoung Song
ac5f6af148 Move fast scrolling logic to BaseRecyclerView
- This change has no effect on actual functionality but to make it easier
for widget tray to inherit the goodness of the 1) fast scroller
functionality 2) unify the scroll look and feel with the all apps view

b/21375339

Change-Id: Ib859b1c3352c0b69f16549ded8f20eb82cf58ba8
2015-05-29 12:00:44 -07:00
Winson Chung
5f4e0fdd2e Moving all apps code into sub package.
- Renaming resources, dimens, etc to be more consistent
- Removing old AppsCustomize resources and other unused code

Change-Id: I15ce35e7cb7a9b9344fc7103963e4e4c9e45d89a
2015-05-22 12:21:40 -07:00