xamarin/Xamarin.Forms

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

オープン

#3,335 opened on 2018/07/18

 (3 件のコメント) (4 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
a/layoute/5 :clock5:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド