Short question:
Suppose I have some kind of a layout file and I inflate it (or use the normal CTORs in code).
Instead of showing the inflated view, I wish to take a "screenshot" (a bitmap) of how it would look like under some limitations (of given width&height, even larger than the screen).
I do not wish to add the view to anywhere on the screen, but only hold it for this purpose and maybe add it later.
Such a thing could be useful for easy manipulations of how to place things. For example, I could use a layout that an image would be put inside it so that it would have a frame around it.
Is such a thing possible? If so, How?
draw
-method, should be able to draw to a canvas, even if it is not added to any layout. You do however need to take it through all the layout-stages of its lifecycle. developer.android.com/reference/android/view/… – Dong