cancel
Showing results for 
Search instead for 
Did you mean: 

resize text

Former Member
0 Kudos

Hello,

I want to change the font of title text :"hello" depending on my device : desktop, tablet or iphone.

for example , when i run my app from tablet, i want small font.

How can i do this?

 sap.ui.getCore().attachInit(function() {
            	var shell =  new sap.m.Shell({
                    app: new sap.ui.core.ComponentContainer({
                    
                        name: "index"
                    }),
                    title : "hello"
                }).placeAt("content");

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor

1.create css class for different size,

2.in the init function check the device type/size, assign the corresponding class you created in step1

Answers (0)