Most of my views will have 5 - 10 widgets and I am trying to figure out how to make the buttons, dropdowns look their best.
I have tried setting their dimensions as a % of the current screen size but this is not an ideal solution for very large screen or very small ones. Mobile users will be the primary end users.
What is the best way to effect this So a mobile user will actuall be able to see a decent sized button a small screen while a PC user will not end up looking at some huge buttons if they are full screen.
You can use ViewPort Meta tag to maintain proper widths and heights for your web applications on mobile devices too.. with out changing all the layouts .
The viewport meta tag to control layout on mobile browsers.
See the below question also ,which I already answered to set the viewport .
Achieving min-width with viewport meta tag
In modern browsers, apart from the viewport as is mentioned in the other response and which applies to the entire document, you could use css scale transformations.
See this pure html/css example
What I do in GWT is whether, I have different .ui.xml or css bundle for desktop and mobile permutations with different scale values, or I change it by code (computing scale factor in base of window size, browser type, etc).
In the second case you can use gwt element methods:
panel.getElement().getStyle().setProperty("WebkitTransform", "scale(0.65, 0.65)");
panel.getElement().getStyle().setProperty("MozTransform", "scale(0.65, 0.65)");
or I'd rather use the gwtquery syntax:
$(panel).css($$("-webkit-transform: scale(0.65, 0.65); -moz-transform: scale(0.65, 0.65);"));
Related
I am working on mobile app that represents a gamebook.
It contains episodes and each of them is built of one or more pages of text.
For every episode I use PageView with children Columns(with nested Text and RichText) for each page. The screen orientation is locked on portraitUp and the textScaleFactor - on 1.0.
The problems I found with this approach are related with the different screen characteristics of mobile devices:
I need to determine the amount of text for every child of the PageView.
But how much text will not bottom overflow on the smaller screens?
My approach till now is to test on relatively small devices with resolution close to 360 x 640 logical pixels and to leave some extra space below text.
Additionally I could make every page of the PageView scrollable, thus preventing overflow at all, but this will produce bad UX by my opinion.
I use font size suitable for devices with the mentioned resolution.
But on considerably bigger screens it will not look pretty.
So, is there good approach to determine how much text to place on each page of the PageView and to scale the font size according to mobile device size and screen characteristics?
Also, I will appreciate if anyone suggest better way to compose such book-like mobile app with Flutter(using different set of widgets).
Thanks for your time.
#Milenb If you can add text pagination then I think it will solve your issue. You wan't need to scale down/up on the basis of screen height. If you look in to this thread then you will know how to do this.
I would like to make responsive (combobox,input etc.) ui controls in sapui5. But on the web environment some of components such as combobox and input are looking so large. I've uploaded an image regarding to this problem. How can I change view sizes of these ui controls ? Is there a simple way to do this like using sap.m.size ? I hope I made make myself clear.
Here is the link of image;
https://ibb.co/dJBdVx
It's event simplier than resizing each control to a given size...
SAPUI5 has a feature called 'content density' mode. Which stablishes the controls/paddings/margins sizes depending on the selected mode.
There are 2 main modes. 'Cozy' which is the large one, and it is meant for touchable devices (your finger is a thick pointer) and 'compact' for desktop devices (with a mouse you can point accurately).
So all you need to do is setting one of this modes based on the device.
Here the tutorial to know how to do it.
And here the documentation about the 'content density'
I'm trying to optimize our News pages for iPhone. One problem I've noticed is that I'm able to tap and move the page horizontally (i.e. wiggle).
My question is, how I can prevent this horizontal movement from happening?
All of our News pages have this problem. Here are a couple examples:
With picture
Without picture
Something is definitely set greater than your device width. Add the following to your css to find the culprit.
* {
border-style:solid;
}
You can then narrow down your search by setting border-color:red; to individual classes/tags/ids.
Add "overflow-x: hidden" on the body.
You can try setting user-scalable=0; and see if that has any effect.
This just happened to me too and it was the result of an extra closing div tag. Once I removed the extra </div>, the horizontal "wiggle" didn't happen any more.
I too, had the iPhone "wiggles" on a web page. It ended up being caused by an image that was wider than the column width it sat in (it was the last column in the row using Twitter Bootstrap). You might be thinking "obvious", but it's hard to spot when the image background matches the page background.
Just make the image responsive, or smaller than the column width - that solved it for me.
Taking the idea from other websites, most of big sites have a mobile site. look at those (the only one i know is facebook m.facebook.com) you can maybe see how the css is done. possible way of doing this is %. I would suggest to take out the sidebar for the mobile version. big pictures should be taken out or be resized so the browser doesn't have scroll bar side to side.
I want to creat a php page named contact us especially for iphone to display it in webview.current page of contact us on website is large and its visibly it not good looking in webView.
What size of page should i made in order to diplay it clearly in iphone UIWebView.
You're asking the wrong question. The question you should be asking is "What is it about my current page design that makes it unsuitable for display on the iPhone?" When you figure that out, you'll know how to fix your login screen. (Although since you seem concerned about screen size, my guess is your design is too busy/complicated and expects/assumes a large screen size. Consider simplifying your HTML and CSS, and reducing your overall design to only what's necessary.)
There are several meta tags you can send to Mobile Safari that will lock the scale factor or the px width of the web page. This may help manage how you want your page to show up. For instance I use this on a small page that I want to show up at 1:1 scale on my iPhone (I use it for icon visibility testing).
<meta name = "viewport" content = "initial-scale = 1.0, user-scalable = no"/>
Is anyone aware of a website or download to reference for the size of UI elements or standard iphone interface stuff? What I mean is something that gives the height of elements like the status bar, tab bar, navigation bar, default tableviewcell height (and such things as width of accessory view, indentation, etc), default icon sizes, default font sizes for UI elements (if they need to be mimicked, for instance), etc etc etc.
It's amazing how many times I have to go back to find a reference or estimate the size and position of a standard element. It seems like it would be an invaluable resource that could fit on a printed page or two.
Found most of what I was looking for here:
http://www.idev101.com/code/User_Interface/sizes.html
This website has a PSD with the iPhone UI elements that might give you the exact information you are looking for.
http://www.teehanlax.com/blog/2009/06/18/iphone-gui-psd-30/