Created
December 11, 2020 10:46
-
-
Save dadouf/9cafbd994fe7bf90955872c8c1e6a611 to your computer and use it in GitHub Desktop.
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
private val prominentThreshold = context.resources.getDimensionPixelSize(R.dimen.prominent_threshold) | |
// In scaleChildren: | |
for (i in 0 until childCount) { | |
val distanceToCenter = ... | |
child.isActivated = distanceToCenter < prominentThreshold | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment