landscape

landscape mode in tablet only

会有一股神秘感。 提交于 2019-12-07 01:32:43
问题 My app has to support landscape/portrait mode only for tablets, phones will only support portrait mode. What is the best way to implement this? Options that I am considering: a) using two apk files, one for phones and one for tablets. The one for phone will lock landscape mode in the manifest 2) using one apk file. Detect that device is a phone, lock landscape mode inside each activity. any advice will be appreciated. Regards 回答1: You can use a SuperClass for activities and implement this

landscape mode images in a full screen UIImageView

我只是一个虾纸丫 提交于 2019-12-06 18:50:25
Is it possible to let the UIImageView handle landscape images differently from portrait images? I'll try to explain, I have ImageViewController with a UIImageView that fill the entire screen. In some point the user launch a UIImagePickerController and choose a picture from the camera roll. Then I create an instance of the ImageViewController with that picture and push it - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; ImageViewController *ivc = [

UIScrollViews subviews not resizing themselves on Portrait to Landscape Orientation Change

我的未来我决定 提交于 2019-12-06 12:39:50
问题 In my app, I have a hierarchy like Main view -> UIScrollView - > UISearchBar. The search bar covers the whole width of screen. But when it switches to landscape the scrollview adjust itself according to landscape and cover whole screen but its subviews like UISearchBar width remain same as in portrait. Plus I'm using Autolayout and I've correctly set their constraints (Leading and Trailing, width (greater than equal to 320) etc) in storyboard. Also I know there are several answers for this in

Printing landscape html->pdf using abcPDF

家住魔仙堡 提交于 2019-12-06 11:22:11
问题 I am trying to get a PDF generated by abcPDF from html output to print the first three pages in portrait and then switch the fourth page to landscape. I have been able to get the html to switch into landscape for the fourth page by applying this class to a div that is the 4th page: .PageLandscape { width="100%"; height="100%"; filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=3); size:landscape; } When abcPDF converts the html to pdf though, the 4th page is still portait. Any

Iphone Landscape mode switching to Portraite mode on loading new controller

老子叫甜甜 提交于 2019-12-06 06:43:52
问题 My app launches in landscape mode correctly and works great: - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if(interfaceOrientation == UIInterfaceOrientationPortrait) return NO; if(interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft ) return YES; return (interfaceOrientation == UIInterfaceOrientationPortrait); } And updated Info.plist with UIInterfaceOrientation =

How to restrict j2me application in the Landscape mode only

依然范特西╮ 提交于 2019-12-06 06:17:48
问题 I am developing application using J2ME and LWUIT.I want to run this application on landscape mode only. For Nokia there is an attribute : Nokia-MIDlet-App-Orientation: landscape but for other device , What is the attribute to restrict the application to landscape mode only? How to achieve this for different J2ME devices? 回答1: Following is the attribute to restrict application in landscape mode only. Nokia device: Nokia-MIDlet-App-Orientation : Landscape Samsung device: MIDlet-ScreenMode :

AutoCompleteTextView hints in landscape mode

僤鯓⒐⒋嵵緔 提交于 2019-12-06 04:38:51
问题 I'm using AutoCompleteTextView in my app with a custom adapter and it works perfect in portrait mode. In horizontal mode however the software keyboard takes most of the screen and text view uses overlay buttons instead of Views provided by the adapter. I couldn't find a clear documentation about how this works behind the scenes. It seems that in landscape mode AutoCompleteTextView bypasses adapter's getView() method, does some dirty work using getItem() and renders items itself using raw

UIImagePickerController (using camera as source) does autorotate on iPad2, how do i stop it?

女生的网名这么多〃 提交于 2019-12-06 04:10:40
问题 I am trying to write an app with some camera function, and I use an overlay view to decorate it with an image. This is how I implement the app: I use the UIImagePickerController to who the user what the camera takes in, and add a UIImageView onto the cameraOverlayView as a subview so that it works like this: (image at http://www.manna-soft.com/test/uploads/UIImagePickerView-portrait.jpg) This works fine until the iPad2 come into place... it autorotates like this and ruin the layout: (image at

How to merge two landscape pdf pages using pyPdf

时光总嘲笑我的痴心妄想 提交于 2019-12-06 03:55:42
问题 I'm having trouble merging two PDF files with pyPdf. When I run the following code the the watermark (page1) looks fine, but the page2 has been rotated 90 degrees clockwise. Any ideas what's going on? from pyPdf import PdfFileWriter, PdfFileReader # PDF1: A4 Landscape page created in photoshop using PdfCreator, input1 = PdfFileReader(file("base.pdf", "rb")) page1 = input1.getPage(0) # PDF2: A4 Landscape page, text only, created using Pisa (www.xhtml2pdf.com) input2 = PdfFileReader(file("text

UISplitViewController for iphone

梦想的初衷 提交于 2019-12-06 01:23:27
I want to create an iPhone (not iPad) app with a split screen view that shows two view controllers on the same screen, one on the left and one on the right of the screen (landscape only). Is there a way to make UISplitViewController work for iPhone, or is there an open source library i can use to achieve this look? As said, you can not use a split view controller. However, I dont think you need it anyway. Its a little cumbersome and restrictive. You can achieve the effect of the split view controller easily using subviews. (Try to avoid using multiple view controllers as this is generally bad