breautek commented on issue #1465:
URL: 
https://github.com/apache/cordova-android/issues/1465#issuecomment-1507152602

   > Is there any existing Cordova plugin that can work around this in the mean 
time? Perhaps someone who has a good workaround could publish one? I'd much 
appreciate it!
   
   I just open sourced our internal package we are using  
[@totalpave/cordova-plugin-insets](https://github.com/totalpaveinc/cordova-plugin-insets/blob/main/src/www/Insets.ts).
 I don't have documentation written but you can add a listener for inset 
changes like so:
   
   ```javascript
   totalpave.Insets.addListener((inset) => {
      /* inset = {
           top: number;
           right: number;
           bottom: number;
           left: number;
       };
      */
   })
   ```
   
   The plugin provides an Android implementation only. So if you support 
multiple platforms, you need to guard it. Will be publishing to official NPM 
registry soon.
   
   The plugin isn't perfect and currently does produce an issue on app launch 
where the bottom inset is higher than expected. It's also not yet used in any 
of our production apps.
   
   Because I don't foresee a reasonable fix (I believe it is an Android Webview 
bug), I'll be removing this from the 12.x milestone.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to