@@ -812,6 +812,8 @@ public boolean onKey(View v, int keyCode, KeyEvent event) {
812
812
toolbar .addView (close );
813
813
814
814
// Footer
815
+ int footerSize = this .dpToPixels (44 );
816
+
815
817
RelativeLayout footer = new RelativeLayout (cordova .getActivity ());
816
818
int _footerColor ;
817
819
if (footerColor != "" ){
@@ -820,7 +822,7 @@ public boolean onKey(View v, int keyCode, KeyEvent event) {
820
822
_footerColor = android .graphics .Color .LTGRAY ;
821
823
}
822
824
footer .setBackgroundColor (_footerColor );
823
- RelativeLayout .LayoutParams footerLayout = new RelativeLayout .LayoutParams (LayoutParams .MATCH_PARENT , this . dpToPixels ( 44 ) );
825
+ RelativeLayout .LayoutParams footerLayout = new RelativeLayout .LayoutParams (LayoutParams .MATCH_PARENT , footerSize );
824
826
footerLayout .addRule (RelativeLayout .ALIGN_PARENT_BOTTOM , RelativeLayout .TRUE );
825
827
footer .setLayoutParams (footerLayout );
826
828
if (closeButtonCaption != "" ) footer .setPadding (this .dpToPixels (8 ), this .dpToPixels (8 ), this .dpToPixels (8 ), this .dpToPixels (8 ));
@@ -833,7 +835,15 @@ public boolean onKey(View v, int keyCode, KeyEvent event) {
833
835
834
836
// WebView
835
837
inAppWebView = new WebView (cordova .getActivity ());
836
- inAppWebView .setLayoutParams (new LinearLayout .LayoutParams (LayoutParams .MATCH_PARENT , LayoutParams .MATCH_PARENT ));
838
+ // inAppWebView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
839
+
840
+ LinearLayout .LayoutParams webViewLayoutParams = new LinearLayout .LayoutParams (LayoutParams .MATCH_PARENT , LayoutParams .MATCH_PARENT );
841
+
842
+ if (showFooter ) {
843
+ webViewLayoutParams .setMargins (0 , 0 , 0 , footerSize ); // Adding margin the same size as the footer
844
+ }
845
+
846
+ inAppWebView .setLayoutParams (webViewLayoutParams );
837
847
inAppWebView .setId (Integer .valueOf (6 ));
838
848
// File Chooser Implemented ChromeClient
839
849
inAppWebView .setWebChromeClient (new InAppChromeClient (thatWebView ) {
0 commit comments