When I change the orientation of the device, there is a small black flash on the screen, Flutter - flutter

I have a sin up page that works very well, but when I switch to landscape mode, there is a small black flash on the screen that also disappears very early. flutter
I created a sign up page on flutter but when I switch from portrait to landscape mode, I see a black square appear on the screen before it disappears
When change the device orientation (by rotate the device) an black screen is painted in the bounds
what are the cases that can cause this?

I wanted to share my solution which is quite easy compared to my question above. Maybe it will save someone's time.
the black edge that appears when the device pivots (see image) disappeared during the execution of a release (flutter run apk --release).
suddenly everything is going well.

Related

How to get Android emulator to rotate its window

The new Android emulator installed with Android Studio Bumblebee has two buttons in its toolbar to rotate the emulated device 90 degrees clockwise or anticlockwise. On the old emulator rotating the device would rotate the emulator's window as well, but on the new one it doesn't.
So if you start the emulator in portrait mode and rotate you get a tiny landscape device image stuck across the middle of the emulator's portrait window, and if you start the emulator in landscape mode and rotate you get a tiny portrait device image stuck up the middle of the emulator's landscape window.
Is there any way to recreate the old behaviour where pressing the rotate buttons would rotate the emulator's window to fit the rotated phone image inside it?
[Running on Linux with kde window system, in case it make any difference]
I think to recreate old behavior with regards to separate emulator window and rotation you may want do the following:
1. Disable the docking and may be open in Window mode to keep emulator window separate from the main IDE as shown below
2. To rotate, Virtual sensors option can be utilized as follows. Steps are marked 1,2,3 & 4. Beware seems the button marked 4 only appears for few seconds.
Also, one can horizontally expand the emulator window pane when device is in landscape position, to get a feel of landscape window like below:
Following blog post can also be helpful in this regard:
https://android-developers.googleblog.com/2020/10/android-studio-41.html
In case important e.g. if options do not appear the same, i'm using Moonlight(Material) theme

Set a Drawer to portrait even if image goes to landscape

I am using this template to build out an App. First attempt at App building but want to use this for an online exhibition platform for my paintings and photography etc. This is from a Google Flutter demo on Youtube.
https://github.com/MarcinusX/drawer_challenge/blob/master/lib/main.dart
When you run the app in custom guitar drawer mode(set the flip Bool to true ) the Drawer is set to the left side of the screen(portrait mode). I want to use the length of the screen for info and other menu items for the App.
however i need to display the images and paintings in landscape mode.
this is the issue. Is there a way to leave the Drawer as it would be in portrait mode?
ie when the user turns the device to landscape mode, then the Drawer will turn up from the bottom of the screen, and not the left side of the screen as it currently does?
or is there a way to set an image into landscape mode through ratio change that could be done without orientating the device to landscape?
I tried transform.rotate on the image but that means it get renders in portrait mode in landscape orientation. I also tried playing with the Transform.translate but can't work out how to set the Sizebox differently
I am new to this and wish to use the lockdown time to have a place for my work of the last 15 years so can work out how to code the images and place the controls and audio player for the App but if i can get the basic structure set then i can get going with the design.
any help would be great but if need be I will have to design the App around this
....
app in portrait mode
app in landscape mode, want drawer to turn in from bottom of screen not left edge

White bar appears when iPhone changes from portrait to landscape

iPhone image with white bar I'm experiencing an issue with the display of an Angular 6 app with Cordova on iOS devices in landscape mode. The app looks as expected in portrait mode, however when the orientation is changed to landscape a white bar appears on the screen in the top half left corner.
I've tried adding and removing 'viewport-fit=cover' and there's no change.
I also tried debugging the app in Safari using the 'Develop' option and the white bar is not affected by any styling and I can't even inspect the bar ... it's like it doesn't exist in code but appears on the device somehow.
I expect to not see the white bar at the top of the screen when the iPhone device is in landscape mode.
What am I missing? Is this an iOS/Apple issue? Or an issue with Cordova?

Unity Standalone App: Resolution Scaling Issue (OSX)

I have developed a Mac-OSX standalone app in Unity3D (Scale with Resolution: 1920x1080). Most of the time I present the app on my laptop, connected to an external screen, which works pretty well.
But when I'm on the road and use the app on my laptop screen (1440x900), the UI's are all over the place...
I know, BUT is there a way to run the app in a 16:9 ratio (with black bars on the top and bottom), the same as I can do it in the Unity3D editor?
I don't want to go back and re-scale everything to a lower resolution, as this would be a crazy job :(
Is there any solution without re-doing it?
Cheers
Thanks, but sadly this didn't work for me. The problem is my Reference Resolution in the Canvas Scaler is already set to 1920x1080. To fix this, I have to lower the reference, but this means re-doing all the UI's.
However, I found a workaround, which is strange but working. I have set the Default Screen Resolution in Unity to 1920x1080 as in the image/link below.
Now the strange part :)
1. Start the app with the option key on an HD screen and set the resolution to 1920x1080.
2. Save and Quit
3. Now the app is scaled down to 16:9 and keeps everything in place.
This works as long as you don't start this app or any other Unity build, with the option key on a lower resolution screen. In this case it will scale everything back again. You can redo the steps 1-3 and it will work again.
Not sure if there is another way to do this, but at least I have kind of a solution.
Default Screen Resolution in Unity to 1920x1080
There are two things you should check; 'Resolution and Presentation' under 'Player Settings', and canvas scalers. I have being in a situation similar to yours, I had built an iOS application meant for the vertical orientation, but also wanted to test it on macOS, the application launched correctly in fullscreen mode looking like this (The top status bar was intentionally brought down to show the aspect ratio):
Instead of using black bars on the sides, it seems like that Unity simply used the colour of the canvas of the current scene to fill in the gaps. This was my settings to get this result:
Only the 16:10 ratio (MacBook Pro) was checked, but the application functions in the iPhone's vertical ratio, I did not have to manually rescale the canvas,I simply switched the build platform, this was allowed by the canvas scalers I have added onto every canvas with the following setting (UI Scale mode: Scale with screen size | Screen match mode: expand), this would allow the canvas to expand automatically and scale to any aspect ratio, without messing up the UI:
Hope this Helps!

How to open existing app in iPhone 5

when I run an already developed(working in iPhone 4S) app in iPhone 5 without the launch image for 4-inch screen, the UI is breaking. i.e, it is not showing the letter-box view(view with a black patch on both top and bottom of the screen) instead it simply shows some white patch in the bottom alone and shifts the entire UI towards top. I know about the launch image related issues, but without that it should at least show the letter-box type view. But that even is not working. May know what could be the reason?