Hi I am new to OpenUI5 and the logo says "Code Once work on all devices" but like when we use px, rem and em as width units for controls they take standard width which will not resize according to the screen size then how does the responsiveness works as logo says. Why do OpenUI5 claims that is fully responsive which is not?
You are right. If we use width, height, etc, it will be not responsive. So we need to use layouts, percents, anchors, etc. Also we remember that OpenUI5 extended version of jquery.
Related
I'am creating a UI for both iPhone and iPad using "Vary for Traits". But I'am getting confuse when to choose Width or Height.What happen when I select Width or height or both
It will really help to know what the size class constraints mean. See my https://stackoverflow.com/a/52317547/341994 for a summary.
Okay, so what the checkboxes mean depends on what the current traits are for the storyboard you're looking at.
First set the device type you want to design constraints for, on the left. Now you will see some size classes. If you chose an iPad, the size classes are wR hR. That is width Regular and height Regular.
So now click Vary for Traits. You are about to design some constraints. Which size classes are you about to design? Compare that to what we just said. If width should be Regular click Width. If height should be Regular click Height.
So for example if you chose an iPad on the left (wR hR) and you now click both Width and Height, that means Regular Regular, which means “I am about to design for iPad.”
But if you chose a small iPhone in portrait on the left (wC hR) you might now click just Width, which means Compact Any, because you don’t care about the height constraint; you just want Compact Width which means “I am about to design for a small iPhone in any orientation.”
I have a 700x1280 image and my design resolution is 700x1280.
I am not providing separate assets for each device that I target rather i will use one Resource which contains all my assets.
The problem:
When I set my design resolution I pass a ResolutionPolicy::FIXED_WIDTH meaning from what I understand it will scale the width with no bordering but the height may be bordered. But all I see is a fixed width but the height of the image goes out of the screen i.e it's not making the height fit in the screen like FIXED_WIDTH is supposed to do?
FIXED_WIDTH only promises to keep the width using the full physical width of the screen but doesn't promise that the height will stay the same i.e it may go out of the screen. For portrait mode FIXED_HEIGHT is the way to go because your height on any device is definitely bigger than that of the width so by using FIXED_HEIGHT the width will never go out of screen, it's a bummer but that's what you have to do!
I have an application which is built on BorderLayout (following the examples) having 3 content panels with names east, west and center
Within these content panels i have placed various content panels / layout containers having fixed width and height. Many of these child containers have absolute layout. The application is built and the widgets are positioned keeping in mind 1024x768 screen resolution
Now, If this app is opened on a screen having wider resolution say 1280x900 etc, it looks odd leaving out too many white spaces around their area.
I tried autoHeight property of the containers which is removing the vertical scrolling while used (specially with tree panel, which i am using in west panel)
Please help me with any examples / tips to make my application get adjusted to whatever resolution its being displayed on.
Thanks in advance!
you can use a javascript function to get the screen resolution and adapt your dimension after
public static native int getScreenWidth() /*-{
return $wnd.screen.width;
}-*/;
the same goes for height;
this may help too.
You can use GWT RootPanel methods:
int height = RootPanel.get().getOffsetHeight();
int width = RootPanel.get().getOffsetWidth();
What is the difference between width and device-width in CSS?
I know there have already been some questions around this, but I would like to understand these from a media query perspective to sniff browser/device, e.g. desktop/mobile/tablet.
The device-width and device-height features refer to the dimensions of the output device (that is, the screen size).
The width and height features, on the other hand, refer to the dimensions of the rendering surface, which is the viewport (for example, the browser window) for screen media, or the page box for print media.
http://reference.sitepoint.com/css/mediaqueries#mediaqueries__tbl_media-queries_media-features
Is it possible to have a menu bar (navigation bar) on a web site that is independent of iPhone’s zoom (i.e. with fixed width and height) while the rest of the site can be zoomed in and out?
With meta "viewport" I can set the zoom of the whole website, I want to exclude some parts.
It seems that it can't be done by using iFrames or CSS transforms.
Is it possible to be done by tracking Gestures that scale elements, and using javascript to rescale my menu?
iPhone's zoom is a graphical thing - it does not change the html rendering of the page (although it may look at the html element for hints about what how much to zoom).
So, not really, no.