screen-orientation

screen.width/screen.height not updating after screen rotation

前提是你 提交于 2021-02-18 04:52:18
问题 I'm experiencing this problem on an iPhone device (iPhone 7, iOS 10, but also other iPhones too): in javascript, if I intercept the orientationchange event, inside the handler, screen.width and screen.height remain the same (as before rotation). Since this may depend from the viewport settings, this is how my viewport is declared in the .html file: <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1, user-scalable=no" /> Everything works fine

How to deal with apps that force screen orientation in android-x86 on VirtualBox?

最后都变了- 提交于 2021-02-17 19:41:19
问题 If you've used an Android device, you're aware that there are some apps that force the display to portrait and ignore the device's orientation sensor. On a real device, this is not a problem, as you can physically rotate the device in your hands to use the app. However, I am trying to use such an app on android-x86 in Oracle's VirtualBox on a Linux Mint PC, and cannot physically rotate my monitor. I have tried the f9-f12 keys that send a rotation event to the app, but since the orientation is

ViewPager findViewById is null after screen rotation in android

风格不统一 提交于 2021-02-08 10:17:30
问题 I'm using a viewPager to display some forms. My problem is when i rotate the screen of the device and the viewPager is created again, it doesn't see the viewPager when he reaches the findViewById , it's always null . I have no idea how to handle it when rotation change. I tried the onConfigurationChange but it doesn't work, I tried to save the Id of the pager and then retrieve it using that saved id but nothing too. So I'm quite blocked now. pager = (CustomViewPager) getActivity()

How to handle rotate screen and save data in Fragment?

笑着哭i 提交于 2021-02-08 08:20:05
问题 I have 3 Fragment (Fragment Home, Fragment A, Fragment B and Fragment C). First time app run will display Fragment Home (Set in Mainactivity). From Navigation Draw Item can choose every fragment. Every selected item will display detail Fragment. I have problems to handle data and retain fragment : (1). When I select a fragment (for example Fragment A) will show the page of Fragment A. But when I rotate the device, why my fragment back to Fragment Home and not stay at current Fragment ??How to

How to handle rotate screen and save data in Fragment?

拈花ヽ惹草 提交于 2021-02-08 08:17:24
问题 I have 3 Fragment (Fragment Home, Fragment A, Fragment B and Fragment C). First time app run will display Fragment Home (Set in Mainactivity). From Navigation Draw Item can choose every fragment. Every selected item will display detail Fragment. I have problems to handle data and retain fragment : (1). When I select a fragment (for example Fragment A) will show the page of Fragment A. But when I rotate the device, why my fragment back to Fragment Home and not stay at current Fragment ??How to

In AndroidManifest: Expecting android:screenOrientation=“unspecified”

不羁岁月 提交于 2021-02-05 20:11:58
问题 Android Studio 3.6. I want my app to be always in portrait mode. So in my AndroidMainfest.xml : <activity android:name=".activity.SplashActivity" android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> I run the app and SplashActivity shows in portrait mode. Nice. But the editor shows the following error: Expecting android:screenOrientation="unspecified"

How to Detect Screen Orientation Change Event in Windows Mobile 5 & 6 App, With Embedded C++?

牧云@^-^@ 提交于 2021-01-28 02:09:53
问题 I am in way over my head, and am hoping anyone here can help. I am working with an application that is running on Windows Mobile OS, version 5 and/or 6, which is written in Embedded C++. The problem is that controls in the app get all messed up and moved around when the user does something to switch the display orientation, such as opening the device's keyboard. At this point, I have been looking at this forever and am getting a bit desperate. So, I guess I am now hoping for a quick and dirty

android screen orientation handling for spinner

折月煮酒 提交于 2021-01-27 06:07:50
问题 I have a activity in which there is a spinner. since for portrait and landscape mode i have different layout so I am changing layout in onConfigurationChanged method @Override public void onConfigurationChanged(Configuration conf) { super.onConfigurationChanged(conf); setContentView(R.layout.layout); initUI(); } but the problem is when I change orientation , my spinner is recreated so if spinner is open in portrait mode it get close in landscape mode.My requirement is : if it is open in any

Lock orientation (Portrait) on VueJS PWA for all browsers

时光怂恿深爱的人放手 提交于 2020-08-24 04:57:58
问题 I am trying to get a screen lock to work for my web application. I have been searching the forums but cant find a solution to this problem. Does anybody know how I can tackle this problem? Problem solved with a css fix. 回答1: I used the scss media queries to solve this problem. @media screen and (min-aspect-ratio: 13/9) { html { transform: rotate(-90deg); transform-origin: left top; width: 100vh; overflow-x: hidden; position: absolute; top: 100%; left: 0; } .bw-dashboard { height: inherit; } }

Lock orientation (Portrait) on VueJS PWA for all browsers

此生再无相见时 提交于 2020-08-24 04:56:10
问题 I am trying to get a screen lock to work for my web application. I have been searching the forums but cant find a solution to this problem. Does anybody know how I can tackle this problem? Problem solved with a css fix. 回答1: I used the scss media queries to solve this problem. @media screen and (min-aspect-ratio: 13/9) { html { transform: rotate(-90deg); transform-origin: left top; width: 100vh; overflow-x: hidden; position: absolute; top: 100%; left: 0; } .bw-dashboard { height: inherit; } }