set second page orientation to landscape - odoo-8

I want to set the second page orientation to landscape, for that I used css transform property, but I have some issues (the content should fit the page).
I want to know if it is possible using QWEB?

Related

Xamarin: How to set a box view that has 16:9 aspect to fill horizontally and require necessary height?

I just want to make sure no matter if the user rotate the phone, my box view will always be filled the horizontal, while keeping the same aspect.
Basically I am using FFImageLoading for displaying the image, however, if there is no image, I still want to keep that space and put some placeholder for it.

How to "disable" FullPage on smartphones and display sections as a long page?

I am using FullPage JS to display a few sections. On the desktop, it works perfectly.
However, Some sections have quite an amount of content. On smartphones, part of the content of these sections is covered. Put another way, I am only able to see part of the content of these sections when I scroll (I already used media queries to reduce content display on smartphones, but these sections do have more content than what a full screen can display on smartphones).
I need the usual FullPage JS to work for me on the desktop. However, can I disable full screen display on smartphones and simply display a list of sections as a long page on smartphones? Did anyone do this before?
fullpage.js provides options for it such as responsiveWidth and responsiveHeight that will turn off auto scrolling under a given value in px.
Combine those with the class fp-auto-height-responsive and you'll get what you want.
All of this is detailed in the docs.
Responsive auto height sections
A responsive auto height can be applied by using the class fp-auto-height-responsive. This way sections will be full height until the responsive mode gets fired.
responsiveWidth: (default 0) A normal scroll (autoScrolling:false) will be used under the defined width in pixels. A class fp-responsive is added to the body tag in case the user wants to use it for his own responsive CSS. For example, if set to 900, whenever the browser's width is less than 900 the plugin will scroll like a normal site.
responsiveHeight: (default 0) A normal scroll (autoScrolling:false) will be used under the defined height in pixels. A class fp-responsive is added to the body tag in case the user wants to use it for his own responsive CSS. For example, if set to 900, whenever the browser's height is less than 900 the plugin will scroll like a normal site.

How to get background images to scale to the same size in Xcode Autolayout?

The Problem:
I am currently trying to get the background image of launch page of my app and the first view controller to match in size.
On left, launch screen on the right first view controller.
However as you can see the navigation bar appears to resize the background image.
Both back ground images are currently set to centre vertically and horizontally and both have equal width and height to the view.
What Ive tried
I have obviously tried messing around with auto layout to now avail,
I have also tried toggling the Extend Edges “under Top Bars” option, it is currently set to true in the above image. This didn't work either.
Question
How do I get both background images to have the same sizes (consistent) between the launch screen and the first view controller, for all iPhone devices (in auto layout)?
Found the answer for anyone with this problem.
Tick extend edges under Opaque bars for the view controller.

How to resize between 3.5" and 4" screens (dynamic constraints in autolayout?)

I have one view filling the screen with a background image. Other views (text fields) are in exact positions (the background image includes the text field background images). When I change from 3.5" screen to 4", the text fields don't change in the same way that the background resizes. The bg image simply resizes to fill the screen, but the text fields jump out of alignment.
Is there a way to have two sets of constraints, one for each screen size? or is there a way to have views resize proportionally to another view?
EDIT:
Is there a way to have two sets of constraints, one for each screen
size?
Yes, by adding constraints programatically and checking [[UIScreen mainScreen] bounds] to get the screen size.
or is there a way to have views resize proportionally to another view?
Yes, you could set this up in interface builder. But it will be hard to manage, I would manage the constraints manually in code since you are using a custom background image the textviews need to position exactly
You're going to struggle to get these things to line up properly with the text view backgrounds being part of the background image.
You should amend your image assets and use the background property of UITextField to have an actual background image, and remove the boxes from your main background image. The icons could be separate images as well.
Failing that, it would make more sense to have the image stretch underneath the text boxes rather than on top.
Your layout is doing what it should do based on your description, but the image isn't stretching in the right way. In your screenshots, username is always the same distance from the top, and the others are the same distance from the bottom, but that isn't how image stretching works. I don't know how you've set it up but it would make sense to have a single image the size of the 4 inch screen, which has the bottom cut off for 3.5 inch devices, and constrain everything from the top.

How to check the positions of different controls in iPhone

How to check some place is already reserved by some controls before adding a new control to the view.
I have added some buttons in the UIImageView and I want to display some images in a label which I'm getting in a random size from the server.I want to place those images over the empty places in the same view.
After adding the first image in some empty place,how could I know that this place is reserved and I have to place the second image in some other placeand the images and buttons should not overlap over each other.
Can somebody please help me ?
Try using CGRectIntersectsRect on the control's frame property (which it inherits from UIView).
http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGGeometry/Reference/reference.html
I don't believe this will work for rotated views though...hm.
See this image for reference: http://cl.ly/3T3d3w0D2I2Q1w1r0m46

Resources