@@ -117,6 +117,8 @@ public class InAppBrowser extends CordovaPlugin {
117
117
private static final String BEFORELOAD = "beforeload" ;
118
118
private static final String FULLSCREEN = "fullscreen" ;
119
119
120
+ private static final int TOOLBAR_HEIGHT = 48 ;
121
+
120
122
private static final List customizableOptions = Arrays .asList (CLOSE_BUTTON_CAPTION , TOOLBAR_COLOR , NAVIGATION_COLOR , CLOSE_BUTTON_COLOR , FOOTER_COLOR );
121
123
122
124
private InAppBrowserDialog dialog ;
@@ -799,7 +801,7 @@ public void run() {
799
801
RelativeLayout toolbar = new RelativeLayout (cordova .getActivity ());
800
802
//Please, no more black!
801
803
toolbar .setBackgroundColor (toolbarColor );
802
- toolbar .setLayoutParams (new RelativeLayout .LayoutParams (LayoutParams .MATCH_PARENT , this .dpToPixels (44 )));
804
+ toolbar .setLayoutParams (new RelativeLayout .LayoutParams (LayoutParams .MATCH_PARENT , this .dpToPixels (TOOLBAR_HEIGHT )));
803
805
toolbar .setPadding (this .dpToPixels (2 ), this .dpToPixels (2 ), this .dpToPixels (2 ), this .dpToPixels (2 ));
804
806
if (leftToRight ) {
805
807
toolbar .setHorizontalGravity (Gravity .LEFT );
@@ -901,7 +903,7 @@ public boolean onKey(View v, int keyCode, KeyEvent event) {
901
903
_footerColor = android .graphics .Color .LTGRAY ;
902
904
}
903
905
footer .setBackgroundColor (_footerColor );
904
- RelativeLayout .LayoutParams footerLayout = new RelativeLayout .LayoutParams (LayoutParams .MATCH_PARENT , this .dpToPixels (44 ));
906
+ RelativeLayout .LayoutParams footerLayout = new RelativeLayout .LayoutParams (LayoutParams .MATCH_PARENT , this .dpToPixels (TOOLBAR_HEIGHT ));
905
907
footerLayout .addRule (RelativeLayout .ALIGN_PARENT_BOTTOM , RelativeLayout .TRUE );
906
908
footer .setLayoutParams (footerLayout );
907
909
if (closeButtonCaption != "" ) footer .setPadding (this .dpToPixels (8 ), this .dpToPixels (8 ), this .dpToPixels (8 ), this .dpToPixels (8 ));
0 commit comments