Bug 60155 - Rendering issues on Android 4.2
Summary: Rendering issues on Android 4.2
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.4.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-10-12 13:18 UTC by Zeljko
Modified: 2018-02-12 18:24 UTC (History)
5 users (show)

Tags: 4.2, entry, render, ac
Is this bug a regression?: ---
Last known good build:


Attachments
Sample app (45.99 KB, application/zip)
2017-10-13 11:49 UTC, Zeljko
Details
Sample Forms Only (1.79 MB, application/zip)
2017-11-03 09:56 UTC, Zeljko
Details
Forms 2.5 repro (69.09 KB, application/x-zip-compressed)
2017-12-08 14:44 UTC, Lukáš Novotný
Details
Forms 2.5 sample no binding (68.54 KB, application/x-zip-compressed)
2017-12-08 15:16 UTC, Lukáš Novotný
Details


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 ANSWERED

Description Zeljko 2017-10-12 13:18:46 UTC
After upgrading from form 2.3 to 2.4 our app no longer works on android 4.2. Controls are rendered incorrectly or not at all. For example, our login page has two entries, an image, a label and two buttons. Only the image is displayed.

Everything works as expected on 4.4 and up.
Comment 1 Paul DiPietro [MSFT] 2017-10-12 14:14:53 UTC
What device is this occurring on, and can you upload a reproduction? Our own reproduction/control gallery app appears to run fine on a 4.2 simulator, so we would need more information about what is occurring.
Comment 2 Zeljko 2017-10-12 17:56:49 UTC
We can reproduce it on a visual studio emulator for android (API Level 17, Similato to Samsung Google Nexus S). I'll try it on some devices with the same API level and make a sample accordingly.
Comment 3 Zeljko 2017-10-13 11:49:02 UTC
Created attachment 25301 [details]
Sample app

OK, I managed to replicate the issue in a sample project. It turned out this might be a Prism issue though.

If you run it on an android 4.2 you'll see that there is missing an Entry control between the two labels. If you move the binding property to the cunstructor everything works as expected. Devices with higher APIs don't seem to be affected.
Comment 4 Zeljko 2017-11-02 06:30:26 UTC
Bump!
Has anyone managed to take a look at the sample?
Comment 5 Paul DiPietro [MSFT] 2017-11-02 15:57:29 UTC
I believe that if you can't reproduce this without using Prism that you should file an issue there, since as it stands a plain old binding works on a 4.2 emulator. If their feedback points to a specific Forms issue, it can then be brought back here. Thanks!
Comment 6 Zeljko 2017-11-02 16:26:34 UTC
Hi Paul,

I can actually reproduce it without Prism as well. For example, our app has a master detail page with expandable items. Meaning if you tap on one of the menu items (a simple StackLayout) a child layout becomes visible (through a bindable property). This doesn't work anymore in 4.2.
Comment 7 Paul DiPietro [MSFT] 2017-11-02 16:52:02 UTC
Please upload the behavior a new project without anything except Forms usage and we can take a look at it.
Comment 8 Zeljko 2017-11-03 09:56:31 UTC
Created attachment 25550 [details]
Sample Forms Only
Comment 9 Zeljko 2017-11-03 10:00:39 UTC
Hi Paul,

Please check the attached sample. I added buttons which set the binding property. You'll see that they have no effect on 4.2, but work properly on 4.4 and up.

It's also worth to note that this happens only if you navigate to the page first.

Thanks!
Comment 10 Paul DiPietro [MSFT] 2017-11-03 17:25:54 UTC
Thank you for the updated project. I'll move this to confirmed for the time being.
Comment 11 Lukáš Novotný 2017-12-08 14:44:18 UTC
Created attachment 25952 [details]
Forms 2.5 repro

We have also encountered this issue using latest bits (xamarin forms 2.5.0.121934, VS 15.5.1, xamarin android 26.1.0.1). I'd like to ask whether it would be possible to bump priority on this as it's directly affecting our users.

I've attached updated and further simplified repro. In the sample I've discovered that the issue goes away if we remove `ScrollView`. Another hint is that if the control is visible by default hiding/showing works, but the `StackLayout` doesn't update positioning when the control is hidden.

Tested on following:
Emulator - Android 4.1.2 - broken
Emulator - Android 4.2.2 - broken
Real Device - Android 4.2.2 - broken
Emulator - Android 4.4.2 - working
Real Device - Android 8.0.0 - working
Comment 12 Lukáš Novotný 2017-12-08 15:16:13 UTC
Created attachment 25953 [details]
Forms 2.5 sample no binding

Further notes about the issue:
 - data binding is not required at all (sample updated)
 - setting FastRenderers_Experimental doesn't change behavior
 - issue is not `Entry` specific, in the sample `Entry` can be substituted by other elements (tested `Label`)
 - issue is not present on first shown page (substitute `RedirectPage` for `MainPage` in `App.xaml.cs`)
Comment 13 Morten Attermann Holst 2018-01-24 13:56:54 UTC
Hi there

We have been struggling to find a solution to this issue, but without any success. As soon as the content of the scroll view is larger than the visible area, layout does not work any more.

Even in the attached example where the label is toggled, and the space is correctly expanded and collapsed. As soon as the status labels reach the bottom of the visible area, the layout stops collapsing and expanding. Furthermore, starting with the scroll view already scrollable, due to added controls, the label does not display at all - No expanding.

Bottom line. If the scroll view content is larger than the visible area, then layout stops behaving sanely.

This is an urgent matter to us.
Please let us know when this bug will be attended to, and if we can be of any assistance.


Best regards
Morten
Comment 14 Morten Attermann Holst 2018-01-26 12:48:47 UTC
Hi all

FYI!
I have created a ticked with Microsoft in order to get this issue fixed.


Best regards
Morten
Comment 15 Morten Attermann Holst 2018-01-31 12:14:31 UTC
Update

The ticket has been closed with a reference to this issue, which I mentioned in the ticket.

Answer:
"
Hello Morten,

I hope all is well and thank you for all of the details!

I spoke to the Xamarin Forms team to get more attention on this bug report.  While I cannot guarantee a timeframe, hopefully we can get this bug cleaned up soon.

As this issue has already been confirmed and there is no known code-workaround, we will need to wait for the team to address the issue.

Any progress and updates will be reflected on the bug report itself - https://bugzilla.xamarin.com/show_bug.cgi?id=60155

I apologize that we do not have solution for you, yet.
"


Best regards
Morten
Comment 16 Samantha Houts [MSFT] 2018-02-12 18:24:55 UTC
This issue has been migrated to https://github.com/xamarin/Xamarin.Forms/issues/1332. Please follow that issue for updates. Thanks!