landscape-portrait

AlertDialog Displays Landscape-Sized View with Orientation in Landscape

本秂侑毒 提交于 2019-12-03 20:42:26
My app's main activity is set in the manifest to always be in portrait view. This works fine when I load the app onto the tablet. However, when I use my menu button and click "Setup", which opens an AlertDialog that inflates an xml layout, the tablet will display the left 2/3 or so of the entire dialog. The rest of it goes offscreen to the right. This case only occurs if I install my app on the tablet while holding it in landscape mode or if I turn the tablet to landscape mode while the app is not running (even if I go back to Portrait and click on the app). The dialog even calls this

iOS - Allow Landscape mode on videos only

好久不见. 提交于 2019-12-03 17:33:15
I have videos throughout my app. Some using MPMoviePlayerController, others in a UIWebView with YouTube. I want my app to be totally portrait. However, I want to give the user the option to flip to landscape when there's a video (not force, but optional). I've been searching the web for an answer, but I haven't found anything yet. Thanks for your help! I had the same issue and fixed it by adding this in my app delegate, basically allowing Landscape orientation only on subclasses of MPMoviePlayerViewController: #import <MediaPlayer/MediaPlayer.h> @implementation UIViewController (orientationFix

How to fit the application for both config like portrait,landscape in android?

半世苍凉 提交于 2019-12-02 17:50:49
问题 I have done my application in portrait configuration. When I load my application in device its coming portraint configuration. But in landscape mode i keep missing some controls. How can I fix the screen for both configurations? 回答1: You probably have to define different layouts for landscape and portrait. You could force android to choose the proper layout depending on orientation. You could put landscape layout xml files in “res\layout-land” and portrait in “res\layout”. Of course it’s

Captured image always shows landscape and setRotate cannot be resolved

大兔子大兔子 提交于 2019-12-02 10:32:50
There are quite a few similar topics and issues around here and I follow this . But I get error. My Code @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK) { if (requestCode == 1) { //h=0; File f = new File(Environment.getExternalStorageDirectory().toString()); for (File temp : f.listFiles()) { if (temp.getName().equals("temp.jpg")) { f = temp; File photo = new File(Environment.getExternalStorageDirectory(), "temp.jpg"); //pic = photo; break; } } try { Bitmap bitmap;

Setting Printer Preference - Page Orientation to Landscape

和自甴很熟 提交于 2019-12-02 00:39:17
问题 I would like to set the Page orientation to LandScape for printing excel worksheet from my excel Vsto project. Manually page orientation is set from the Printer Preference window which is popped up from 'Print' form. I need some automation which will set the orientation to LandScape every time user gives print command. I have noticed that if i set the orientation to LandScape from my excel application, it stays same for if i want to give a print from a MS-word application & vice versa. So

Can I determine if a device is in portrait or landscape mode using jquery?

匆匆过客 提交于 2019-11-30 20:56:14
I want to conditionally alter what the user sees on the photo gallery web site I'm going to create based on if the device being used to view the site is in portrait/vertical vs. landscape/horizontal mode/orientation. Is this possible? Try the orientationchange event handler, something like this: $(window).bind("orientationchange", function(evt){ alert(evt.orientation); }); Here's the jQuery Mobile entry on detecting and firing the orientationchange event. If you are just changing the layout, consider CSS Media Queries instead. In Chrome 7 and Firefox 3.6, there is the deviceorientation event

Can I determine if a device is in portrait or landscape mode using jquery?

徘徊边缘 提交于 2019-11-30 17:39:09
问题 I want to conditionally alter what the user sees on the photo gallery web site I'm going to create based on if the device being used to view the site is in portrait/vertical vs. landscape/horizontal mode/orientation. Is this possible? 回答1: Try the orientationchange event handler, something like this: $(window).bind("orientationchange", function(evt){ alert(evt.orientation); }); Here's the jQuery Mobile entry on detecting and firing the orientationchange event. 回答2: If you are just changing

How to make an ipad app only portrait?

不问归期 提交于 2019-11-30 14:23:24
I am making an ipad app, and i set the the app to only portrait, but it still works in landscape? Why is this happening only on an ipad? How do i fix this? Note: if the answer is in code, please write it in swift. In xcode select your project. Go to Targets -> General, scroll down and you can select the Orientation as portrait only. You can also make change to info.plist file to select proper orientations for Supported interface orientations (iPad) In deployment Info section you can select your app orientation to support. 来源: https://stackoverflow.com/questions/29779330/how-to-make-an-ipad-app

How can I use constraints AutoLayout with to specify a different layout on landscape vs. portrait without using code?

纵饮孤独 提交于 2019-11-30 13:22:02
I have an iPad app that features a login screen, with the login controls contained within a UIView. When the iPad is in portrait orientation I have the Login UIView near the bottom and center of the app, pretty much right above where the keyboard will be, and the company logo is in a UIImageView centered across the top. I'm using AutoLayout constraints to keep the company logo gravitated to the top and right, and the Login UIView gravitated to the bottom and right. (source: chattypics.com ) When I rotate this to landscape, the effect is something like this: (source: chattypics.com ) I want it

Resize a view when a keyboard appears (iOS)

安稳与你 提交于 2019-11-30 06:43:16
问题 I realize there are many similar solutions, such as TPKeyboardAvoiding, Apple's famous solution, and various suggestions involving the use of UIScrollView. In my case, I need to resize a view to accommodate the keyboard rather than scroll or move it. This solution comes closest to what I'm trying to achieve, so it was my basis. However I'm having an issue making things work in landscape mode. My method that resizes the view when the keyboard appears is this: - (void)keyboardWillShow: