Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Android] RecycleElement List: using bindings for FormattedText results in "requestLayout() improperly called" issues #3335

Open
endarea opened this issue Jul 18, 2018 · 3 comments
Labels
a/layout e/5 🕔 5 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested p/Android t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@endarea
Copy link

endarea commented Jul 18, 2018

Description

I have a list with CachingStrategy set to RecycleElement. When using bindings for a label's FormattedText the console is filled with messages like requestLayout() improperly called by {...}.FormsTextView{...} during layout: running second layout pass

Steps to Reproduce

  1. Create a List with CachingStrategy set to RecycleElement
  2. Add simple cells: a label with FormattedText linked to a bindable property in the view model
  3. Fast scroll up and down

Expected Behavior

The list should scroll smoothly with no errors

Actual Behavior

Application Output is filled with messages like the one above. The scroll's behavior doesn't seem to be impacted when the debugger is not connected. These messages are not displayed when binding to a CLR property which creates a new FormattedString() instance on each get or when using RetainElement as a CachingStrategy.

Basic Information

  • Version with issue: Xamarin.Forms 3.1.0.637273
  • Last known good version: ?
  • IDE:
  • Platform Target Frameworks:
    • Android: 8.1
  • Affected Devices: I can name Huawei Nexus 6P (API 27) but it happens on other devices too

Reproduction Link

FormattedTextRepro.zip

@PureWeen
Copy link
Contributor

I had a little bit of an issue recreating this but was able to with a Nexus 6P API 27 Emulator

image

@adrianknight89
Copy link
Contributor

I ran into this problem today. In my case, the console message was generated continuously in an infinite loop unless I stopped the debugger. It was coming from LabelRenderer, and I was using a plain Label without FormattedText.

@melimion
Copy link
Contributor

melimion commented Nov 2, 2018

Any news/workaround?

This issue makes app very laggy and stops us from updating to 3.1 and later

@samhouts samhouts added the inactive Issue is older than 6 months and needs to be retested label May 1, 2019
@samhouts samhouts added help-wanted up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! help wanted We welcome community contributions to any issue, but these might be a good place to start! and removed help-wanted labels Jun 28, 2019
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/layout e/5 🕔 5 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested p/Android t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
None yet
Development

No branches or pull requests

5 participants