Skip to Content
author's profile photo Former Member
Former Member

SAPUI5 - Forcefully load as mobile always

Hi,

I am using a splitapp. Our app will be used in tablets most cases. I want to load the splitapp in a tablet similar to how it looks in phone.

i.e., the master page has to the home screen. Once, we move to a detail page, a menu button has to appear in the top left corner.

Is there a way to forcefully load as mobile always. I am not looking for any responsiveness among phone, tablet, desktop.

Thanks in Advance,

Senthil

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2014 at 04:35 PM

    Try running your app by passing the fakeOs parameter in the url,

    http://<path>/index.html/?sap-ui-xx-fakeOs=android .

    This will emulate the app as in mobile.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 12, 2014 at 07:34 PM

    Hi Senthil,

    Can you try the below code and see, if it solves your issue ?

    this.app = new sap.m.SplitApp("AppID",{ afterDetailNavigate: function() { if (sap.ui.Device.system.phone) { this.hideMaster(); } }, });

    Best Regards,

    Gaurav.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 12, 2014 at 09:28 PM

    My 2 Cents on your requirement.

    UI5 Application which are based on HTML5 follow the concept of responsive designing due to which they have different look in different devices.

    Technical there seem to be a way to achieve your requirement using the method - removeDetailPage of sap.m.splitApp

    Hope this helps

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 16, 2014 at 08:57 AM

    Why insisting on using SplitApp if you don't use an, ahem, split? 😭

    Just use App and/or a simple NavigationContainer

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      When the tablet/mobile is in portrait mode, we need the top left menu option along with master view occupying entire screen.

      When the app opens, we need the master view to be the default screen occupying entire screen.

      When the tablet/mobile is in landscape mode, we need the master-detail view.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 16, 2014 at 09:21 AM

    Hi Senthil,

    have you tried to use sap.m.SplitAppMode.HideMode to hide your master view?


    Please take a look at the following links


    Regards

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.