Create new Media Preview infrastructure, behind feature flag.

This commit is contained in:
Nicholas
2022-09-30 09:42:06 -04:00
committed by Greyson Parrelli
parent 1af576c157
commit f63ce79f16
20 changed files with 406 additions and 71 deletions

View File

@@ -4,11 +4,12 @@ import android.view.View;
import androidx.annotation.NonNull;
import androidx.viewpager.widget.ViewPager;
import androidx.viewpager2.widget.ViewPager2;
/**
* Based on https://developer.android.com/training/animation/screen-slide#depth-page
*/
public final class DepthPageTransformer implements ViewPager.PageTransformer {
public final class DepthPageTransformer implements ViewPager.PageTransformer, ViewPager2.PageTransformer {
private static final float MIN_SCALE = 0.75f;
public void transformPage(@NonNull View view, float position) {