landscape

android:screenOrientation=“sensorLandscape” showing error for a project with the minimum SDK as 2.2

≯℡__Kan透↙ 提交于 2019-12-11 10:06:50
问题 I'm trying to set android:screenOrientation="sensorLandscape" for one of my activities, to enable landscape left and landscape right. In my project properties, I've set the project build target to Android 2.2. In my manifest, the minimum SDK version is set to Android 2.2 as well (API level 8): The line in my manifest is: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"/> According to the docs, the "sensorLandscape" attribute should be available to me, but still, when I try

Android Screen Orientation Change Causes App To Quit

和自甴很熟 提交于 2019-12-11 05:48:45
问题 I have an app that I set to only display in Portrait mode by setting android:screenOrientation="portrait" for each Activity in the manifest. This works fine and my app screen does not rotate when I rotate the phone. The problem is, if I start the app with the phone in Portrait orientation, then as my first Activity runs (an animated splash screen) and I rotate the phone to Landscape while the first Activity is still running, when the next activity is launched (it is launched from the finally

Disable rotation for one UITabbar item

房东的猫 提交于 2019-12-11 03:20:46
问题 I have a uitabbarcontroller with 4 tab bar items and each tab bar item has a uinavigationcontroller. I needed to lock the orientation of one uitabbar item only to Portrait. So i implemented the following code: Created a custom tab bar controller and added the following code in it: MainTabBarController.m -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // You do not need this method if you are not supporting earlier iOS Versions return [self

Landscape Apps Xcode 5 / iOS 7

跟風遠走 提交于 2019-12-11 03:17:14
问题 I have a piano app in the App Store. It works in landscape mode. Now iOS 7 appears to be ignoring the Landscape setting in IB The app works as expected in iOS 6 and below, in landscape. In iOS 7 appears in portrait. Here are settings and relevant code: //iOS 6+ - (BOOL)shouldAutorotate { return YES; } //iOS 6+ - (NSUInteger)supportedInterfaceOrientations { return (UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight); } //iOS 5.1.1- - (BOOL

TimePickerDialog widget in landscape mode (PreferenceScreen)

*爱你&永不变心* 提交于 2019-12-11 01:57:29
问题 The TimePickerDialog widget in PreferenceScreen in landscape mode is too small. screenshot I've tried out both approaches (PreferenceActivity and PreferenceFragments) according to these instructions: TimePicker in PreferenceScreen The TimePickerDialog layout is empty in landscape mode, when using a timepicker title. So I've disabled the title. In the PreferenceActivity Version I've added setDialogTitle(""); to TimePreference. In the PreferenceFragmentCompat Version I've added the following

Android XML Layout works in landscape but not in normal orientation

不羁的心 提交于 2019-12-11 01:45:58
问题 I'm trying to display an Admob ad but this only works in Landscape but not in normal mode. layout-land/main.xml and layout/main.xml are the same! (well now they are because i deleted everything else to find the bug) <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:myapp="http://schemas.android.com/apk/res/test.testpkg" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/background" android:padding = "10dip" >

Set viewport for landscape mode only

吃可爱长大的小学妹 提交于 2019-12-11 00:32:00
问题 I'm finishing my website and everything works perfectly except for one little thing. When I'm using my iPhone, the portrait mode is exactly as I want it, the problem is the landscape mode. I is like I've design it, but I don't like the final version... So I need to insert another line of code, but I don't know how to do it... This is the one I have right now <meta name="viewport" content="width=device-width,initial-scale=1"> Now I need one just for the landscape mode. I want this one ^ to

Show SoftKeyboard in landscape but not entire screen

五迷三道 提交于 2019-12-10 22:18:10
问题 Im trying to achieve something like this image: the problem its when im on landscape and put a searchbar like the image, the soft keyboard cover all screen,and i want the behavior like the image i tried android:windowSoftInputMode="adjustPan|adjustResize" and seems isnt working,at least on jelly bean. any ideas? Thanks 回答1: i found the solution, in imeOptions of EditText, so i used android:imeOptions="flagNoFullscreen" so the screen now its in middle :) <EditText android:id="@+id/txt_search"

Make app start and remain in landscape mode

五迷三道 提交于 2019-12-10 18:07:03
问题 How can I start my app in landscape mode, and keep the screen rotation that way? 回答1: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); } 回答2: Implement the view controller's shouldAutorotateToInterfaceOrientation: method and return UIInterfaceOrientationIsLandscape(orientation); Also set the Info.plist keys

Best way to change XIB files based on rotation? [closed]

前提是你 提交于 2019-12-10 12:33:29
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . My app has so far just been a portrait-based application. However, I am adding landscape mode to a new version, but have found that my XIB files look shocking when rotated from portrait to landscape. Apparently I need to make a landscape version of each XIB and use some code to