You need to override onSaveInstanceState(Bundle outState).

The method you're overriding only gets called if with the attribute persistableMode is set to persistAcrossReboots in your Manifest.
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter