@@ -259,7 +259,7 @@ private void handleRenderComplete(JSONObject jsonObject) {
259
259
260
260
private int getPageHeightData (JSONObject jsonObject ) {
261
261
try {
262
- return WebViewManager . pageRectToViewHeight (activity , jsonObject .getJSONObject (IAM_PAGE_META_DATA_KEY ));
262
+ return pageRectToViewHeight (activity , jsonObject .getJSONObject (IAM_PAGE_META_DATA_KEY ));
263
263
} catch (JSONException e ) {
264
264
return -1 ;
265
265
}
@@ -306,7 +306,7 @@ private void handlePageChange(JSONObject jsonObject) throws JSONException {
306
306
}
307
307
}
308
308
309
- private static int pageRectToViewHeight (final @ NonNull Activity activity , @ NonNull JSONObject jsonObject ) {
309
+ private int pageRectToViewHeight (final @ NonNull Activity activity , @ NonNull JSONObject jsonObject ) {
310
310
try {
311
311
int pageHeight = jsonObject .getJSONObject ("rect" ).getInt ("height" );
312
312
int pxHeight = OSViewUtils .dpToPx (pageHeight );
@@ -507,12 +507,14 @@ private static void enableWebViewRemoteDebugging() {
507
507
}
508
508
}
509
509
510
- private static int getWebViewMaxSizeX (Activity activity ) {
511
- return OSViewUtils .getWindowWidth (activity ) - (MARGIN_PX_SIZE * 2 );
510
+ private int getWebViewMaxSizeX (Activity activity ) {
511
+ int margin = messageContent .isFullScreen () ? 0 : (MARGIN_PX_SIZE * 2 );
512
+ return OSViewUtils .getWindowWidth (activity ) - margin ; //- (MARGIN_PX_SIZE * 2);
512
513
}
513
514
514
- private static int getWebViewMaxSizeY (Activity activity ) {
515
- return OSViewUtils .getWindowHeight (activity ) - (MARGIN_PX_SIZE * 2 );
515
+ private int getWebViewMaxSizeY (Activity activity ) {
516
+ int margin = messageContent .isFullScreen () ? 0 : (MARGIN_PX_SIZE * 2 );
517
+ return OSViewUtils .getWindowHeight (activity ) - margin ;
516
518
}
517
519
518
520
private void removeActivityListener () {
0 commit comments