Tablet working as a smartphone in Silk UI Mobile

Tablet working as a smartphone in Silk UI Mobile

  

Hi,

Is it possible that an application running on a portrait tablet has the same responsive behavior as on a portrait smartphone ?

My Silk UI Dublin Theme Application has a behavior in portrait smartphone (hide menu, etc) and another in a portrait tablet.

Thanks,

Roberto


Hi Roberto,

It is possible, Silk UI checks several aspects of the device to understand which type is it, including touch capabities, user agent and resolution.

Some Tablets will not report as tablet from the user agent, and, if they have a small screen width while on portrait, they match the Phone settings and will be handled as such.

My regards

Hi Dinis,

Thanks for your attention! That sounds are good. But can you oriented me to reach this objective. I.e, how can I do to my tablet shows my application as a smartphone portrait ? Setting parameters, CSS code ?

Best Regards,

Roberto

Unfortunately, there isn't an easy way to do it for now, the mechanism to detect the device is not configurable.

If the goal is to change the layout to match other device, e.g. hide the left menu, you can override the CSS from the Theme to make it the way you need.

As an example, if you copy the CSS for .tablet.menu {...} and change to .phone.menu {...}, you'll have the same menu from tablet, also in phone. This is the possible workaround for this use case. Keep in mind that this will require some CSS work.

Hi Dinis,

I understand. Thank you for your attention.

Best Regards,

Roberto

Hi Dinis,

Only more a question. I followed with success the recomendation to hide dublin theme menu, writing these two comands in a Style Sheet of my webscreen:

SyntaxEditor Code Snippet

.Menu {
    display:none;
    width:  0px;
}

.Content.ThemeGrid_Wrapper {
    left: 0px;
}

But now I would like transform this hidding menu in an option, i.e, hidding only under a condition. Then how can I include a condition in these commands. I know to do this in other styles using the Style Editor with IF Build Function. But in Style Sheet Web Screen I don't get.

Thank you,

Roberto