Can you file an issue with this information and include a link to install 
the beta so we can test that?
Thanks!

On Saturday, March 13, 2021 at 6:53:05 PM UTC+2 [email protected] wrote:

> Last msg about this promise :)
>
> So revalidating the contentpane reduces the number of times that the error 
> occurs, but doesn't remove the error always
>
> Also, a tap is required to bring the BrowserComponent back to visible
>
> It looks like, with the new WebView beta update, CN1 isn't able to animate 
> the BrowserComponent back to the center when showing back a form. It looks 
> like it gets stuck on the left side of the screen
>
> On Sat, 13 Mar 2021 at 16:35, Javier Anton <[email protected]> wrote:
>
>> OK, so even though this happens when the Beta version of WebView is 
>> installed on Android, it also stops happening if 
>> previous.getContentPane().revalidate() is called right after 
>> previous.showBack()
>>
>> Please look into this when you can because it is bound to cause issues. 
>> At least now we know that revalidating the content pane gets rid of this
>>
>> On Sat, 13 Mar 2021 at 14:49, Javier Anton <[email protected]> wrote:
>>
>>> The following code reproduces the bug. As stated above, to reproduce the 
>>> error the Android System Webview (Beta) version needs to be installed and 
>>> chosen as primary WebView in Settings. This version will replace the stable 
>>> release very soon, so time is of the essence
>>>
>>> Notice that when navigating back to the previous form, the 
>>> BrowserComponent is blank on Android (doesn't always happen, might need to 
>>> try 2 or 3 times to see it). To test, just call testMethod() from anywhere
>>>
>>> public void testMethod()
>>>         {
>>>             Form previous = Display.getInstance().getCurrent();
>>> Form welcomeForm = new Form("Test", new BorderLayout());
>>>                 BrowserComponent tstBrowser = new BrowserComponent();
>>>                 tstBrowser.setURL("https://www.google.com";);
>>>                 welcomeForm.add(BorderLayout.CENTER,tstBrowser);
>>>                 
>>> welcomeForm.getToolbar().addMaterialCommandToRightBar("GO_FORWARD", 
>>> FontImage.MATERIAL_ARROW_FORWARD, ee -> {
>>>                     testMethod2();
>>>                 });
>>>                 welcomeForm.show();
>>>         }
>>>         public void testMethod2(){
>>>             Form previous = Display.getInstance().getCurrent();
>>> Form welcomeForm = new Form("Test", new BorderLayout());
>>>                 
>>> welcomeForm.getToolbar().addMaterialCommandToLeftBar("ShowBack", 
>>> FontImage.MATERIAL_ARROW_BACK, ee -> {
>>>                     previous.showBack();
>>>                 });
>>>                 welcomeForm.show();
>>>         }
>>>
>>>
>>> On Sat, 13 Mar 2021 at 12:30, Javier Anton <[email protected]> wrote:
>>>
>>>> Upcoming bug in Android WebView (currently found in Beta) that affects 
>>>> CN1 apps hosting a BrowserComponent
>>>>
>>>> I have filed this issue with Chromium project 
>>>> https://bugs.chromium.org/p/chromium/issues/detail?id=1187828
>>>>
>>>> The bug isn't yet present in stable releases of Android Webview 
>>>> (89.0.4389.69) but has already made its way from Dev and Canary to Beta 
>>>> (90.0.4430.19)
>>>>
>>>> Basically, a CN1 form that contains a BrowserComponent will lose its 
>>>> browsercomponent when shown back. Strangely, it comes back to life if you 
>>>> open a side Sheet and tap on it (see attached, sometimes it requires 
>>>> opening a Sheet multiple times)
>>>>
>>>> I would normally think that this is a problem in my code but I
>>>> -Tested extensively
>>>> -Verified that the issue only happens when upgrading WebView
>>>>
>>>> Now, I filed the issue with Chromium using the word "Activities" in 
>>>> place of Form even though this isn't very correct as CN1 is a single 
>>>> activity. I did this to make it easier to understand, but please feel free 
>>>> to contribute if you think you can hint at something that will make it 
>>>> easier to solve this
>>>>
>>>> Thanks
>>>>
>>>>
>>>> Javier
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/86db9ac2-d1fd-4fe3-98e6-8b63e8508134n%40googlegroups.com.

Reply via email to