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 2018/09/05 19:25:32 UTC

[GitHub] hvaughan3 opened a new issue #294: Android - Footer Overlaps WebView

hvaughan3 opened a new issue #294: Android - Footer Overlaps WebView
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/294
 
 
   On Android, when setting `footer` to `yes`, the footer bar overlaps the WebView content, causing it to cover up the bottom slice of the WebView.
   
   I was able to fix the issue by forking the library and using `setMargins` on the WebView's `LinearLayout.LayoutParams` equal to the height of the footer, but I only did that because I could not get any other way to work so I am not sure if this is the best way to fix the problem.
   
   My fix is below.
   
   FROM:
   
       inAppWebView = new WebView(cordova.getActivity());
       inAppWebView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
   
   TO:
   
       int footerSize = this.dpToPixels(44);
   
       inAppWebView = new WebView(cordova.getActivity());
   
       LinearLayout.LayoutParams webViewLayoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
   
       if (showFooter) {
           webViewLayoutParams.setMargins(0, 0, 0, footerSize); // Adding margin the same size as the footer
       }
   
       inAppWebView.setLayoutParams(webViewLayoutParams);

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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