elrafael commented on issue #409: Resize the IAB URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/409#issuecomment-464092007 Open the file `InAppBrowser.java` and search for this code ```java WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); lp.copyFrom(dialog.getWindow().getAttributes()); lp.width = WindowManager.LayoutParams.MATCH_PARENT; lp.height = WindowManager.LayoutParams.MATCH_PARENT; ``` It's near line 958 you'll need to change the lp.height attribute to something like this ```java // lp.height = WindowManager.LayoutParams.MATCH_PARENT; DisplayMetrics displayMetrics = new DisplayMetrics(); cordova.getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); int displayWidth = displayMetrics.widthPixels; int displayHeight = displayMetrics.heightPixels - 200; lp.height = displayHeight; ``` Import the Display Metrics on top of that file ```java import android.util.DisplayMetrics; ```
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
