Bug 59410 - White Bar on top of WebView Resizing when SoftInput appears
Summary: White Bar on top of WebView Resizing when SoftInput appears
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-12 08:57 UTC by zixiangx
Modified: 2017-10-16 19:14 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description zixiangx 2017-09-12 08:57:34 UTC
Currently, the WindowSoftInputModeAdjust is set as Resize to accommodate WebView input.

However, there is a white stripe under the statusbar and the the statusbar background is directly below under the white strip displaying as another strip.

I've updated to XF 2.4-Pre2, as I understand PR 892 (https://github.com/xamarin/Xamarin.Forms/pull/892) is supposed to fix this issue by removing the underlying status background, but still has no effect prior to upgrading.

The only way I got it to work is to put the set the status bar height in MainActivity.cs

---------------------
            //Remove the status bar underlay in API 21+
            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                Window.DecorView.SystemUiVisibility = 0;
                var statusBarHeightInfo = typeof(FormsAppCompatActivity).GetField("_statusBarHeight", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
                statusBarHeightInfo.SetValue(this, 0);
                Window.SetStatusBarColor(new Android.Graphics.Color(18, 52, 86, 255));
            }
            
            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());

            App.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);

------------------------
Comment 1 Jimmy [MSFT] 2017-09-14 15:27:55 UTC
Make sure you have updated the Xamarin.Forms package in _all_ your projects to 2.4.0-pre2 and then do a clean and rebuild. If you are also currently using that code in MainActivity, remove it after updating the packages as it should no longer be needed.

If you continue to experience this issue, let us know what device/emulator you are testing with and attach a simple project that reproduces the issue so we can investigate further. When providing the requested information, please set the report's status back to NEW otherwise we may close this issue after 30 days of no response. Thanks!
Comment 2 Paul DiPietro [MSFT] 2017-10-16 19:14:05 UTC
Marking as no response and assuming this is no longer an issue. Please reopen if this is still an issue as of the latest 2.4.0 stable build.