Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of

We want the button to have its natural size, based on its text width and height.

Set its text size using device independent pixels, DIP.

Add it to the LinearLayout.

Use Seekbar as a slider....

to set the text size and the stroke width.

Add it to the LinearLayout...

just as the instance of Cnv,...

that we made an inner class in this lesson.

This then fills the remaining space of the LinearLayout.

Here we use a Path to register the drawing commands.

We use an extra Paint instance for the text drawing settings.

Setting the background colour.

Drawing the path and the text on top of it,...

with their own Paint settings.

Pushing the button clears the path and has the onDraw method called.