on 10-31-2017 8:18 PM
Hi experts
I am trying to prevent design studio to display in landscape (portrait only) and I have tried to use the below css to achieve this and it is not working as I don't know what I am doing wrong.
/* Smartphones (portrait landscape) ----------- */
@media screen
and (min-width : 320px)
and (max-width : 768px)
and (orientation : portrait)
Hi Robert,
The CSS media feature orientation is not intended for forcing the device orientation to landscape or portrait. It simply allows you to apply different styles based on whether the orientation is landscape or portrait. In other words, orientation:portrait will not force/switch the orientation to portrait.
If you provide a screenshot of your application with a description of what layout you would like to see in both portrait and landscape orientations then we can try to suggest design approaches accordingly.
Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Mustafa for your response.
Please see the above screenshot of the application both in landscape and portrait as displayed on an iPhone 6.
What I am trying to achieve is to prevent the application from displaying in landscape on an iPhone (Portrait only)
Regards
Robert
Hi Robert,
If you are consuming the Design Studio application directly in the iOS Safari browser (as appears to be the case in your scenario), then you CANNOT lock the orientation in Portrait Mode using CSS. This is by design and explained in the answer of the following post:
As suggested in the above post, you could display a message when the device is in landscape orientation to alert the user that this mode is not supported.
If you consume the Design Studio application from the SAP BI Mobile app for iOS, which is the SAP recommended approach, then the iPhone version of the app is locked in Portrait mode as per your requirement.
Regards,
Mustafa.
Hi Robert - which version and SP of Design Studio are you using?
Consider using Lumira Designer which has an adaptive layout https://help.sap.com/viewer/4f58d91f03e441b68d3187e94be27df2/2.0.2.0/en-US/2e39302ef2184dce8a7265fb0...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.