This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:drawable="@drawable/media02_001" android:duration="25"/> | |
<item android:drawable="@drawable/media02_002" android:duration="25"/> | |
<item android:drawable="@drawable/media02_003" android:duration="25"/> | |
<item android:drawable="@drawable/media02_004" android:duration="25"/> | |
<item android:drawable="@drawable/media02_005" android:duration="25"/> | |
<item android:drawable="@drawable/media02_006" android:duration="25"/> | |
<item android:drawable="@drawable/media02_007" android:duration="25"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ZoomPageTransformer: ViewPager.PageTransformer { | |
companion object { | |
private const val MIN_SCALE = 0.85f | |
private const val MIN_ALPHA = 0.5f | |
} | |
override fun transformPage(view: View, position: Float) { | |
val pageWidth = view.width | |
val pageHeight = view.height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DepthPageTransformer: ViewPager.PageTransformer { | |
companion object { | |
private const val MIN_SCALE = 0.75f | |
} | |
override fun transformPage(view: View, position: Float) { | |
when { | |
position < -1 -> // [-Infinity,-1) | |
// This page is way off-screen to the left. | |
view.alpha = 0f |