Modify (or remove) black bar at bottom of iOS in QML application
Ok, this is pretty tricky to get right. Get ready.....
- As you have done, you have to have a launch screen storyboard which is good.
- I use this setting on my
Window
to run full screen:
flags: Qt.Window | Qt.MaximizeUsingFullscreenGeometryHint
Probably same effect as your visibility setting above.
- Now, if you really want to do this right, you will need some C++ code.
QVariantMap System::getSafeAreaMargins(QQuickWindow *window)
{
QPlatformWindow *platformWindow = static_cast<QPlatformWindow *>(window->handle());
QMargins margins = platformWindow->safeAreaMargins();
QVariantMap map;
map["top"] = margins.top();
map["right"] = margins.right();
map["bottom"] = margins.bottom();
map["left"] = margins.left();
return map;
}
Note, in your .pro
file you'll need to add:
QT += gui-private
and include this header:
#include <QtGui/qpa/qplatformwindow.h>
You need to put that on a class you expose to QML via a C++ class. This will return to you the "Safe Area Margins" for the current device. There's some more information on that topic here:
https://developer.apple.com/documentation/uikit/uiview/positioning_content_relative_to_the_safe_area?language=objc
- Now you have to use that information to adjust the layout of each of your screens.
The short of it is that when in full screen, your window extends to the physical top of the screen and to the physical bottom of the screen. And that's behind the status bar and behind the home bar at the bottom. If for instance your background is white then your white status bar will look like it disappeared when really it is there but not distinguishable.
The getSafeAreaMargins
above returns info that tells you what the safe area margins are around your content based on the device type. You use those to make sure your background content runs up behind the status bar and home bar when it makes sense and that your foreground content never does. You accomplish that by adding this information to each of your page layouts as needed (via margin and padding settings or spacer objects).
Note, these values change as the app launches and as the orientation changes....
How to remove black bar menu from the bottom of android screen?
How do you hide/remove the useless bottom black bar?
Set your targetSdkVersion
to 14 or higher.
Preferably without raising the targetSdkVersion?
Chop the bottom portion of the phone off with a very sharp axe. Note that this may void your warranty on the phone.
Remove black bar bottom of UIImagePickerController
As, in iOS7 image picker move to whole screen but prior to iOS7 you may not have full screen camera view so that you may need to apply transformation in your screen view
if your device is running iOS6 (4 inch):
CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.0, 1.930);
if your device is running iOS6 (3.5 inch):
CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.0, 1.260);
if your device is running on iOS7 (4 inch)
CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.0, 1.670);
self.picker.cameraViewTransform = cameraTransform;
Related Topics
Adb Is Not Detecting My Android Device on Ubuntu
Android Scrollview Not Scrolling Down After Keyboard Opens
How to Change Background Color of Layout of List-View Item Using Array-Adapter
Textview With Too Long Strings
Android: How to Send an Image as Email Attachment from Application
Android Navigationview: Reduce Space Between Icon and Text and 'Itembackground' Not Working
Android Adb Devices Does Not Detect My Phone
Webview and Html5 ≪Video≫
What Is the Simplest and Most Robust Way to Get the User'S Current Location on Android
Touchableopacity Not Working Inside an Absolute Positioned View
String Resource New Line /N Not Possible
Alarm Manager Won't Work When the App Is Killed in the Background and Device Is Locked
How to Show the Number Keyboard on an Edittext in Android
Could Not Identify Launch Activity: Default Activity Not Found
How to Get the Json Response of a Post Request in a Webview
How to Select Only One Checkbox in Recyclerview and Notifydataset Changed