I don't understand this necessity, but maybe explaining for what it's needed can lead someone to propose even some alternate solution if this thing cannot be achieved by code.
Sagenut, My application starts with a webview and a html page. Within webview, I have a javascript to execute the app - to set for full screen / not full screen during runtime. This enable the application change its 'look' depending on the javascript command.