Application on mobile device [message #1832741] |
Thu, 24 September 2020 03:51  |
Eclipse User |
|
|
|
Hi.
I have a problem. I have a menu defined on the desktop. When I open the page on my mobile phone, I don't see the menu items. This is probably due to some adjustment for the mobile client.
In the Technical Guide, the DeviceTransformationPlatformListener class is described in chapter 14.2 and is written here: "If you don't want any of
these transformers to be active you could simply replace this listener and do nothing."
My questions:
1. How do I set the display of menu items on mobile clients?
2. I want to experiment with the DeviceTransformationPlatformListener class. How can I replace it so Scout can use mine?
Thank you very much for the advice.
|
|
|
Re: Application on mobile device [message #1833718 is a reply to message #1832741] |
Thu, 22 October 2020 08:26  |
Eclipse User |
|
|
|
Hi there
If the desktop is in compact mode, the tool box will be moved from the desktop header to the navigation. If the navigation is visible, which is the default if you have outlines and no form is open, then the menus should be visible. In your application, is the navigation visible or the bench incl. the header?
To turn off the desktop transformation you could replace the MobileDeviceTransformer and replace the transformDesktop method.
@Replace
public class CustomMobileDeviceTransformer extends MobileDeviceTransformer {
@Override
public void transformDesktop() {
// Do nothing
}
}
Outline elements like pages and detail forms are still transformed, just override the corresponding methods to turn that off.
Note that with the upcoming Scout 11 it will be easier to disable the transformation of the desktop and outline using MobileDeviceTransformation.MAKE_DESKTOP_COMPACT.
I have just recently updated the Mobile chapter in the Scout 11 Tech Doc. Even though some points will only be valid in the upcoming release, the most is already valid for the current Scout 10 release. There you will now also find the answer to your second question:
@Replace
public class CustomDeviceTransformationPlatformListener extends DeviceTransformationPlatformListener {
@Override
public void stateChanged(PlatformEvent event) {
// Do nothing to not register any extension so no transformation will happen
}
}
Hope it helps
Claudio
|
|
|
Powered by
FUDForum. Page generated in 0.03802 seconds