0x253 commented on a change in pull request #134:
URL:
https://github.com/apache/cordova-plugin-statusbar/pull/134#discussion_r414299026
##########
File path: src/android/StatusBar.java
##########
@@ -206,6 +212,16 @@ public void run() {
return false;
}
+ private float getStatusBarHeight() {
+ float statusBarHeight = 0;
+ int resourceId =
cordova.getActivity().getResources().getIdentifier("status_bar_height",
"dimen", "android");
+ if (resourceId > 0) {
+ float scaleRatio =
cordova.getActivity().getResources().getDisplayMetrics().density;
+ statusBarHeight =
cordova.getActivity().getResources().getDimension(resourceId) / scaleRatio;
+ }
+ return statusBarHeight;
Review comment:
I know, I use the Safari `safe-area-inset-*` variables since iPhone X.
What you are suggesting is an Android Chrome bugfix plugin. Basically, a
Corodva plugin for Android without an exposed JavaScript interface, that sets
the `safe-area-inset-*` env variables in the Android WebView's document. The
plugin could also handle orientation changes. I think the Statusbar plugin is
not the correct place to fix the missing env variables of Chrome.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]