Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25629] Android : Webview with fullscreen window not working as expected

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2018-03-13T21:51:19.000+0000
Affected Version/sRelease 7.0.0, Release 7.0.1
Fix Version/sn/a
ComponentsAndroid
Labelsescalation
ReporterAminul Islam
AssigneeGary Mathews
Created2017-12-25T18:20:15.000+0000
Updated2018-08-06T17:37:04.000+0000

Description

I am coming across an issue with webview for android. I have explained it in this screencast (video/audio). https://screencast-o-matic.com/watch/cblZFY29zJ Steps: 1. Create an example apps with fullscreen window. 2. Add a webview with the following URL : https://wallet.gbsinfosolutions.com/index.php/mobile-topup' 3. Click on cardholder name text field in webview. 4. Webview stopped scroll Note: This issue only for Android with fullscreen window. Test Code :
var webview = Titanium.UI.createWebView({
	url : 'https://wallet.gbsinfosolutions.com/index.php/mobile-topup'
});
var window = Titanium.UI.createWindow({
	fullscreen:true
});
window.add(webview);
window.open({
	modal : true
});
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar.Fullscreen"/>
</manifest>
</android>

Attachments

FileDateSize
0-sa-d2-899e7fd926716b5dc565ee9246b85508.jpg2017-12-25T18:23:27.000+000074197

Comments

  1. Eric Merriman 2018-01-31

    [~gmathews] Can you take a look and comment?
  2. Gary Mathews 2018-01-31

    Thanks for the detailed test case. Google states [here](https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_FULLSCREEN), using a fullscreen Window will ignore the SOFT_INPUT_ADJUST_RESIZE flag; preventing the window from resizing. Which is necessary for the WebView to resize above the keyboard and display the hidden content. Unfortunately, there is no workaround for this. You cannot use a fullscreen window if you want your WebView to resize correctly. I suggest removing the fullscreen property and theme, and adding Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE to resolve the issue.
       var webview = Titanium.UI.createWebView({
       		url : 'https://wallet.gbsinfosolutions.com/index.php/mobile-topup'
       	}),
       	window = Titanium.UI.createWindow({
       		windowSoftInputMode: Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE
       	});
       
       window.add(webview);
       window.open();
       
  3. Eric Merriman 2018-08-06

    Closing as invalid. If incorrect, please reopen.

JSON Source