Skip to Content
0
Jun 22, 2020 at 05:18 PM

Change sap ui5 theme on click of a button after bootstrap

483 Views

Hi Experts,

What I am looking for is a way to change the SAP UI5 theme after it has been rendered?

The approach mentioned in the below link is before the bootstrap happens.

https://answers.sap.com/questions/10173073/how-to-add-two-different-themes-in-one-sapui5-appl.html#

Say I want to shift between two themes - Quartz and Belize on click of a button or say even as per the example in the link, if I change my device type to mobile via debugger, I want the theme to change.

In my controller, I have access to window["sap-ui-config"] but changing it is not reflecting in the application? Is there a way to refresh/re-render the application after changing?