Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to draw LinearLayout in canvas?

canvas.drawText() draws text on the canvas. How can I draw a linear layout on the canvas?

Something like canvas.drawLinearLayout() would be excellent but it doesn’t exist.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Not really enough info provided about the state of the LinearLayout (has it been drawn already)

But if it has been drawn already then

myLinearLayout.draw(canvas)

will get the LinearLayout to draw itself the the specified canvas.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading