Skip to Content
avatar image
Former Member

resize text

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");
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 30, 2017 at 05:18 PM

    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

    Add comment
    10|10000 characters needed characters exceeded