Replacing drawables interrupts touch feedback of ripples. Implementing
custom state lists allows altering the corner radius without cutting off
ripples and also means we reduce unnecessary object creation.
Fix: 190467676
Test: locally
Change-Id: I10eec042aae57d278f8254327d42df945767c7ac
onChildAttachedToWindow is called before the layout manager is finished
processing the layout, so incorrect measurements / intermediate
animation states can be present.
onLayoutCompleted occurs after each full layout calculation, including
measuring multiple views or animating, and is a better signal to use.
Fix: 190391539
Test: verified locally with search use case and other expand collapse
cases
Change-Id: If01caf33c6c3371636895e1361d80de536363239
When launching the configuration activity for a widget, use the
activity transition animation.
Test: manual
Bug: 190487998
Change-Id: Ife84e86eec74f81fecddce07c833356a7962fd4b
There are two vertical paddings
1. Table padding
2. Widget cell padding
We haven't taken account the widget cells padding
Test: Manual
Bug: 189814077
Change-Id: I9b1dc9e880d4402b9c461d0024a0748c0afc408a
This removes jitter from incorrectly counting or not the margins for the
headers near the top of the widget picker list.
Bug: 189956230
Test: verified locally
Change-Id: I3eeddbf8a1fb7cca31fe2a12c28b0eb444de631b
Show tip on reconfigurable widget in launcher.
Bug: 185354491
Test: Manually tested tips in widget picker, all apps, and
reconfigurable widgets tip.
Change-Id: I08154c944285cac6a21c3ef4aafd878bbbccf44b
Test: In Pixel 4, drag a monthly view Google calendar widget to a new
home page from the full widgets picker. The widget outline is
correctly shown.
Bug: 189060113
Change-Id: I33113b29cc8923098de95f1d5eb14c2b02429de1
Also fix 2 bugs in WidgetCell
1. preview layout: padding is added to the AppWidgetHostView rather
than the preview container. We shouldn't add padding to the size
of the preview container.
2. widget_preview_shortcut_padding is a padding added to shortcuts but
not widgets.
Test: Open full widgets picker and observe widgets are rendered
correctly in the widgets recommendation table. Also, observe
the generated bitmap images are correctly rendered.
Run AddWidgetTest.
Bug: 189975670
Change-Id: I00db3200e0b61dc5e82f3c4bfdf34e197ea20314
The offset should be taken before views are modified, the position
should be taken after. This fixes an off by one issue when expanding a
header below another already expanded header.
Bug: 183378651
Test: verified locally
Change-Id: I4987d57846d7bcde23b76280f800f19350b3521e
Preview layouts are rendered via LauncherAppWidgetHostView. These
layouts are not yet added to the launcher. And thus, there is no
LauncherAppWidgetInfo.
Test: When a preview layout is shown in the recommended widget section,
rotate the screen. No crash is observed.
Bug: 190395009
Change-Id: Ib1d080a106681fbfe3a4293f9f51f9576ef9414b
Local color extraction doesn't happen if the wallpaper is not currently
visible, so we don't need to add/remove the locations when the widget is
visible/hidden.
Also now compare the locations with some approximate measure, to account
for possibly slightly different calculations during drag vs drop.
Fix: 189827568
Test: Install Clock or test widgets and try to move them: the color are applied correcly.
Change-Id: Ib2a08bb0552c75bd351868e4fd5b5df8b8b732b2
Test: Sideload Google dev clock and verify the 5x5 widget preview is
rendered correctly.
Verify conversation widget preview is rendered correctly in the
full widgets picker and priority flow (aka pin widget flow).
Bug: 189975670
Change-Id: I4b0212ae347044c970ba40b9b33439448a6aa941
Also create the drawables at runtime to avoid all the permutations
Fix: 189329394
Test: verified locally
Change-Id: I0497759ff68bd4ae6b1635423cfd4713f06d349f
Also, scroll after collapsing as well to preserve the header position.
LinearLayoutManager seems to not count/double count the top padding of
the RecyclerView when scrolling to the position. Scrolling with the
offset and deducting the top padding works around the issue.
There's still some occasional weirdness that needs to be investigated,
but this works well...most of the time.
Bug: 183378651
Test: locally
Change-Id: I0ba85fb65411991ef781f08a69faaa993a7d7fd0
This keeps the row in view. Currently, this will scroll the row to the
centre-bottom of the screen due to the top padding being double counted,
but that will remedied in a future CL.
This also resolves the issue where the last row's widgets aren't visible
by handling that case specially
Fix: 188665456
Bug: 183378651
Test: verified locally
Change-Id: I9acb9087a8cdaf130ac5955c810c96462b368f36
During animations, the view group child may not correspond to the
visible views that appear at the top.
The previous logic is kept in the case that the layout manager returns
null for any reason, which can happen before layout has occurred for the
position.
Fix: 189588014
Test: verified locally
Change-Id: Ie8b5dcef50287e9e90a21f86e30a1ebcbbcba30f
Show education dialog on WidgetsFullSheet.
-Have a button in widget education dialog to intent into PixelTips apps.
-Make sure arrow tip view shows after dismissing education dialog on
WidgetsFullSheet if there is a widget to show it on.
-Update colors and layout for arrow tips.
Test: Tested manually
Bug: 185354491
Change-Id: I5cbdd02fc4f19a49a42dac4451b071e3d604747f
Test: Enter some queries in the widgets search bar. Click X button. The
keyboard is still opened after the search queries has been erased.
Bug: 189454318
Change-Id: Icb0501cf36cbf1517e2da24044da44101fa86ed9
The new computation takes into account the new cell layout border
spacing.
Change-Id: Ic20e0906bbbaaf1e53475585e2a6ca31c277e09b
Bug: 187461595
Test: Manual testing, varying the sizes in a widget
If we are fitting more than one widgets / shortcuts on the same row,
we will only allow the total width to be n - 1 cells, where n is the
grid width in cells.
Test: Run WidgetsTableUtils robolectric test.
Bug: 189103942
Change-Id: I2f23cb08fe95d68562188cc7b1852d99d7093dc0
Change animations cause the addition of another view to be able to
crossfade/interpolate the two. Disabling change animations prevents us
losing the focus when a header row changes due to expanding or
collapsing.
Test: verified locally
Bug: 183378651
Change-Id: I07837b41748b5206936321c08d376069fa81b363