Inflate dismissal background instead of drawing while swiping

- Only swipe the foreground out to have the background revealed.
- Inflate dismissal_swipe_background.xml while swiping.
- Fix the fly-in transition.
- Fix the overlapping problem.

Bug: 129742618
Test: robotests
Change-Id: I5311e50332d0ea0437d1693d075d5c3a2176a443
This commit is contained in:
Yi-Ling Chuang
2019-03-29 22:44:27 +08:00
parent d50bb09876
commit dc2b2c7929
8 changed files with 147 additions and 78 deletions

View File

@@ -18,6 +18,7 @@ package com.android.settings.homepage.contextualcards.slices;
import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.RecyclerView;
import androidx.slice.Slice;
@@ -70,10 +71,12 @@ class SliceFullCardRendererHelper {
static class SliceViewHolder extends RecyclerView.ViewHolder {
public final SliceView sliceView;
public final LinearLayout sliceViewWrapper;
public SliceViewHolder(View view) {
super(view);
sliceView = view.findViewById(R.id.slice_view);
sliceViewWrapper = view.findViewById(R.id.slice_view_wrapper);
}
}
}