I take screenshots within my app using:
private Bitmap takeScreenshot() {
View rootView = findViewById(android.R.id.content).getRootView();
rootView.setDrawingCacheEnabled(true);
return rootView.getDrawingCache();
}
This works fine except that the result does not contain any shadow. How can I capture the shadows of elevated objects as well?
I think I can also make a fake shadow using a very old approach, but then this will be a very old approach and will neglect the concept of elevations and natural shadows. Which is I don't want.
Please reply.
Thanks.