Join Slack
Powered by
Is it possible to provide a reflection property to...
# compose
s
Sivan
05/04/2021, 2:18 PM
Is it possible to provide a reflection property to a card or an image composable?
j
Javier
05/04/2021, 2:20 PM
Same image, flipped vertically, crop it and apply a opacity + vertical gradient with the background color
n
nitrog42
05/04/2021, 2:20 PM
you can always hack something by rendering two Image (one reversed), but a real reflection would require some GPU works probably by this API
https://android-developers.googleblog.com/2021/04/android-gpu-compute-going-forward.html
but I'll look into what other's answer
j
Javier
05/04/2021, 2:21 PM
I would like to see an approach without indicating the gradient background color 🤔
s
Sivan
05/04/2021, 3:28 PM
Hmm. Guess it is vulkun moving forward then. Will try out these solutions. Thanks lads
@Javier
@nitrog42
n
nitrog42
05/04/2021, 3:29 PM
good luck
Open in Slack
Previous
Next