Keep the function unchanged and add a field `isFullscreen` with a function `setIsFullscreen`, and add `setIsFullscreen(value)` after `onCreate`. And in template source code, use `isFullscreen` to identify whether call `enterFullscreen()`.