Define styles for mobile devices

xsp.theme.mobile.pagePrefix=mobile
xsp.theme.mobile.android=android
xsp.theme.mobile.iphone=android
xsp.theme.mobile=iphone





To define how your mobile app looks on mobile devices you first have to teach your application what your mobile pages are. You do this by applying a prefix to your mobile pages and set the "xsp.theme.mobile.pagePrefix" property in the "xsp.properties" file. (Open Java Perspective and find the file in the "WebContent\WEB-INF" folder. Once the parameter is set you are all done since the system selects the right styles for each and every mobile device automatically. However if you want to assign different styles to cetrain devices you can use the other parameters provided to to so. In this example I applied the android style to all iphones and the iphone style to all devices not android or iphone.

XPages
Henning Schmidt
November 22, 2011 2:10 AM
Rating
152

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.



1 comment(s)Login first to comment...
Weekay K
(at 10:49 on 13.08.2013)
I am new to mobile dev ,downloaded mobile controls ,unable to change color of header if I alter xsp properties I get black screen. in above example from where android CSS is applied?, p