mgrazianodecastro
01/19/2023, 8:19 PMmgrazianodecastro
01/19/2023, 8:34 PMModifier.graphicsLayer { alpha = 0.99F }
.drawWithContent {
val colors = mutableListOf(Color.Transparent)
.apply { repeat(50){ add(Color.Black) } }
.apply { add(Color.Transparent) }
drawContent()
drawRect(
brush = Brush.verticalGradient(colors.toList()),
blendMode = BlendMode.DstIn
)
}
the trick was the graphicsLayer alpha = 0.99f. Explanation: https://stackoverflow.com/questions/66762472/how-to-add-fading-edge-effect-to-android-jetpack-compose-column-or-rowAlex Vanyo
01/19/2023, 9:06 PM1.4.0
coming that allow you to be more explicit than the 0.99f
trick: https://developer.android.com/jetpack/compose/graphics/draw/modifiers#compositing-strategymgrazianodecastro
01/19/2023, 11:37 PMCompositingStrategy.Always
also works! But I need to study to understand them better