B4XView.Snapshot asks the view to draw itself on a canvas.
The shadows are indeed missing. I can only guess that the shadows are not part of the views tree and are added as a special effect in a different way.
There is no other way to capture a view, other than taking a real screenshot which has many restrictions.
B4XView.Snapshot asks the view to draw itself on a canvas.
The shadows are indeed missing. I can only guess that the shadows are not part of the views tree and are added as a special effect in a different way.
There is no other way to capture a view, other than taking a real screenshot which has many restrictions.
Thanks, as I read on other forums it's because Shadows (Elevation In API25+) are hardware accelerated and is rendered outside of the views pipeline and therefore are not available for caching at the view level.
This is an example that demonstrates how Root.Snapshot + 2 BitmapCreators, with the old and new layouts can be used to create a nice transition between two layouts. Private Sub SetNewTheme As ResumableSub If bc1.IsInitialized = False Then bc1.Initialize(Root.Width, Root.Height)...