portrait

Creating Landscape and Portrait layout using HTML and CSS

别来无恙 提交于 2019-12-05 02:59:24
问题 I have got a requirement where I need to write a HTML/CSS, which should display Landscape and Portrait, depending upon the orientation of the iPad, that is initially I want to write this using HTML and CSS and then later use it for the iPad developement. My question is what is the best way to achieve this? Does it make sense to have two different html/css files and load them depending on the orientation of the device or is there any other way to implement this. Any information regarding this

Android portrait video orientation wrong in VideoView

喜夏-厌秋 提交于 2019-12-05 02:41:17
I capture a new video in PORTRAIT orientation on an Android device like this: Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE); startActivityForResult(intent, 1886); and it gives me this file: "/mnt/sdcard/DCIM/Camera/video-2012-02-02-10-45-48.mp4" Then I play it like this: private VideoView videoView = (VideoView) findViewById(R.id.videoView); String videoUrl = "/mnt/sdcard/DCIM/Camera/video-2012-02-02-10-45-48.mp4"; videoView.setMediaController(new MediaController(this)); videoView.setVideoURI(Uri.parse(videoUrl)); videoView.start(); Here's my layout file: <?xml

How do I make an HTML page print in landscape when the user selects 'print'?

萝らか妹 提交于 2019-12-04 20:09:55
问题 We generate web pages that should always be printed in landscape mode. Web browser print dialogs default to portrait, so for every print job the user has to manually select landscape. It's minor, but would be nice for the user if we can remove this unnecessary step. Thanks in advance to all respondents. 回答1: A quick Google indicates that it's not really supported. There's more than a few folks out there trying to hack their way to it - but I'd strongly suggest just rendering a server side PDF

Android (ActionBarSherlock) Is there any way to keep the same ActionBar height both in portrait and landscape?

本秂侑毒 提交于 2019-12-04 10:35:33
问题 I have been working with the ActionBar and ActionBarSherlock for the last few days, and i am having some issues when filling some information in the ActionBar. When the application runs in portrait mode, the ActionBar looks fine, and all the data can be displayed, for example: But when i switch the app to be displayed in landscape, some of the data is cropped: You can notice how both the status icon and the email has been cropped due to the new height of the ActionBar. In this case, i want to

Android Video not fitting the width in portrait of the videoview and not occupying full screen in landscape

时光怂恿深爱的人放手 提交于 2019-12-04 07:38:28
Android video not fitting the width of the videoview when in portrait, how can i make the width of my video fit the width of my videoview when in portrait, and when i change orientation of the screen to landscape i would like the video to fill the whole screen like the youtube app does. when in portrait the video is to start from the top to the middle of the screen and and when in landscape to fill the whole screen. here is what i have tried, i have also add links of the complete screenshot <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill

android 动态改变屏幕方向

六月ゝ 毕业季﹏ 提交于 2019-12-04 01:32:29
android 动态改变屏幕方向 LANDSCAPE与PORTRAIT 范例说明 要如何通过程序控制Activity的显示方向?在Android中,若要通过程序改变屏幕显示的方向,必须要覆盖setRequestedOrientation()方法,而若要取得目前的屏幕方向,则需要访问getRequestedOrientation()方法。 本 范例为求简要示范更改做法,设计了一个按钮,当单击按钮的同时,判断当下的屏幕方向,例如竖排(PORTRAIT),则将其更改为横排 (LANDSCAPE);若为横排(LANDSCAPE),则将其更改为竖排(PORTRAIT),范例非常简单。图5-25所示是运行的结果。 本程序重写setRequestedOrientation()方法,其目的是为了要捕捉设置屏幕方向的同时所触发的事件,并在更改的时候,以Toast显示要更改的方向。 范例程序 src/irdc.ex05_22/EX05_22.java 程 序一开始(onCreate)先判断getRequestedOrientation()的值是否为-1,若此值为-1,表示在Activity属性里没 有设置Android:screenOrientation的值,这意味着即使单击按钮,也无法判断屏幕的方向,不会进行更改方向的事件了。 在 被覆盖的setRequestedOrientation()事件里

Replicate camera app rotation to landscape IOS 6 iPhone

眉间皱痕 提交于 2019-12-03 13:49:08
Hi I am trying to replicate the same rotation which can be seen in the camera app when orientation is shifted to landscape. Unfortunately I've had no luck. I need to set this up for the custom cameraOverlayView with UIImagePickerController. From this portrait (B are UIButtons) |-----------| | | | | | | | | | | | | | B B B | |-----------| To this landscape |----------------| | B | | | | B | | | | B | |----------------| In other words I would like the buttons to stick to the original portrait bottom and rotate on their centres. I am using Storyboards and Autolayout is enabled. Any help is

Android (ActionBarSherlock) Is there any way to keep the same ActionBar height both in portrait and landscape?

对着背影说爱祢 提交于 2019-12-03 06:11:22
I have been working with the ActionBar and ActionBarSherlock for the last few days, and i am having some issues when filling some information in the ActionBar. When the application runs in portrait mode, the ActionBar looks fine, and all the data can be displayed, for example: But when i switch the app to be displayed in landscape, some of the data is cropped: You can notice how both the status icon and the email has been cropped due to the new height of the ActionBar. In this case, i want to keep the same size for portrait and landscape so the app can look fine. I can't reduce the font size

UISplitViewController: How force to show master popover in app launch? (portrait)

可紊 提交于 2019-12-03 04:27:22
In an iPad App i'm using the UISplitViewController. I need to force to show the master popover when the app launch in portrait mode. Now I'm using this code and it works well on iOS 5.0. if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) { if ([[[AppDelegate sharedAppDelegate] splitViewController] respondsToSelector:[[[AppDelegate sharedAppDelegate] btnMenu] action]]) { [[[AppDelegate sharedAppDelegate] splitViewController] performSelector:[[[AppDelegate sharedAppDelegate] btnMenu] action]]; } } But in iOS 5.1 (with the new type of master popover) the behaviour seems to be random

EXIF orientation tag value always 0 for image taken with portrait camera app android

匿名 (未验证) 提交于 2019-12-03 02:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a camera app in portrait mode which takes pictures from both front and back end cameras.I am saving the image in my sd card and try to find the corresponding exif value which gives 0 always.But i am getting the the expected exif orientation value for the other images stored in the device(like downloaded pictures). How can i fix this ? Can anyone help me out ? Here is the code used to save the picture and the find the orientation PictureCallback myPictureCallback_JPG = new PictureCallback() { @Override public void onPictureTaken(byte[]