Can't get canvas fill the screen

I wrote a tutorial for this 3 years ago.
APIs have been changed since then.

But you would still get some idea on how to make a responsive layout.