Make sure view is laid out before calling createBitmap

This CL contains two fixes:

- Make sure view is laid out before calling createBitmap.

- Organize some field declarations.

Bug: 246412041

Test: manual
Change-Id: Icd5637086b3935afe89743472e68bbd3a6102222
1 file changed