You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/10/14 16:38:32 UTC

[GitHub] [cordova-android] Faksprod opened a new issue #844: Borderless/notch devices doesn't display a fully fullscreen mode

Faksprod opened a new issue #844: Borderless/notch devices doesn't display a fully fullscreen mode
URL: https://github.com/apache/cordova-android/issues/844
 
 
   # Bug Report
   Hello, I'm not sure where I should open this issue. I have already tried [here](https://github.com/mesmotronic/cordova-plugin-fullscreen/issues/38) but the issue has been closed quickly because:
   
   > it appears to be a wider Cordova issue rather than a plugin issue.
   
   ## Problem
   The webview isn't taking the whole space on new Android wide and borderless devices (such as Samsung Galaxy s10, Google Pixel 3XL or OnePlus 6T). As you can see on the attached file, the app is disturbed/displaced from the left side (or top side in portait) which is displaying a black area.
   
   ![android-bordeless-fullscreen-ultrawide](https://user-images.githubusercontent.com/21133515/65510499-5fe8bf80-ded5-11e9-9230-3c8b3059f577.png)
   
   Of course I use the `<preference name="Fullscreen" value="true" />` in my **config.xml**.
   
   ### What is expected to happen?
   The app webview should be displayed correctly, 100% fullscreen, without that black area. My app works and displays well on all 'normal' Android devices.
   
   
   ## Information
   I found some help on [StackOverflow](https://stackoverflow.com/a/54369068/2908227) about how to let the webview taking 100% of the screen.
   First you have to create a new **styles.xml** at the www/ root folder. The **styles.xml** files contains:
   
   ```xml
   <resources>
       <style name="Full">
           <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
       </style>
   </resources>
   ```
   Then in the  **config.xml** files you have to custom/edit with:
   
   ```xml
   <platform name="android">
       <resource-file src="www/styles.xml" target="app/src/main/res/values-v28/styles.xml" />
       <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
           <application android:resizeableActivity="false"/>
       </edit-config>
       <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity">
           <activity android:theme="@style/Full"/>
       </edit-config>
       <config-file parent="./application" target="AndroidManifest.xml">
           <meta-data android:name="android.max_aspect" android:value="5.0" />
       </config-file>
   </platform>
   ```
   
   Ok well, this fix the problem. But! This causes new issues such as (see attached file below):
   
   1 - the Status Bar can't be hidden anymore during app launch. I tried all methods with [StatusBar.hide()](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-statusbar/#statusbarhide) and the [immersiveMode() fullscreen plugin](https://github.com/mesmotronic/cordova-plugin-fullscreen) but nothing helps.
   
   2 - Also, the Splaschreen can't appears fully fullscreen. There is still an empty area on left side even if the app will fit all the screen area after the Splaschreen sequence. I tried to create a splash image larger than the device, it doesn't works. Plus, you get the UI (buttons bar) displaying on the right side for a few seconds at the app launch.
   
   ![android-theme-full](https://user-images.githubusercontent.com/21133515/65511395-6a0bbd80-ded7-11e9-935a-67b4ce0adb80.png)
   
   Did you guys encountered same issues with those borderless devices?
   What method we should use to let the webview taking 100% of the screen?
   Any suggestions would be really welcome. Thanks.
   
   ### Environment, Platform, Device
   Mac OS Mojave 10.14.6
   I do my test on devices by uploading APK on the Live App service from Browserstack (which launch **real** devices through the cloud, not emulators).
   
   ### Version information
   - Cordova 9.0.1
   - Android 8.1.0
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org