TextField change triggers full layout cycle

后端 未结 3 528
滥情空心
滥情空心 2021-02-10 01:27

While looking at performance problems in my app, I discovered that each button press was triggering a call to the full onMeasure()/layout() cycle. There\'s no reason that I can

3条回答
  •  日久生厌
    2021-02-10 01:43

    Changing the content of a TextView (its text) will trigger a relayout. This will however only cause a measure/layout of part of the tree. If this happens only from time to time (when the user clicks a button for instance), don't worry about it.

提交回复
热议问题