I have a frame that is 100% width and the height is also 100% of the width. (If screen is 480 pixels wide, that means the width and height of the frame are 480 pixels wide.)
I’m writing an image editing appkication, and I need the frame to be the only place that a user can draw on. Is there a way I can resize and position the Canvas to the frame?
You can dynamically add a
SurfaceView(or aView) of desired dimensions to your root layout and get thatSurfaceView'sCanvas.