Add dismissal mechanism for contextual cards.

In the homepage, we should allow cards to be dismissed.

- Implement card flipping upon card long pressing.

Bug: 113783548
Test: robotests, visual
Change-Id: I2ddb498321ba5c5078d6944aa2ef32f1386bdb10
This commit is contained in:
Emily Chuang
2018-11-05 20:18:56 +08:00
parent 192c6a1461
commit 6cf3591645
12 changed files with 196 additions and 37 deletions

View File

@@ -126,7 +126,8 @@ public class ControllerRendererPool {
if (ConditionContextualCardRenderer.class == clz) {
return new ConditionContextualCardRenderer(context, this /* controllerRendererPool */);
} else if (SliceContextualCardRenderer.class == clz) {
return new SliceContextualCardRenderer(context, lifecycleOwner);
return new SliceContextualCardRenderer(context, lifecycleOwner,
this /* controllerRendererPool */);
} else if (LegacySuggestionContextualCardRenderer.class == clz) {
return new LegacySuggestionContextualCardRenderer(context,
this /* controllerRendererPool */);