Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

5022-Fix_mailListItem_flicker_issue

Fahim Salam Chowdhury requested to merge 5022-Fix_mailListItem_flicker_issue into main

Description

MessageList item flickers when new data is added/ move in selection mode. This MR resolve this issue by removing expensive add elipsize for multiline textView as it is not high-priority requirement.

Issue(s)

Test environment

Download apk from: https://gitlab.e.foundation/e/os/mail/-/jobs/269836/artifacts/file/app/k9mail/build/outputs/apk/debug/k9mail-debug.apk . Install it in your device.

Test procedures

  • Open mail app, long press in any mail item (it will trigger selection mode). Select multiple items, check listView items flicker or not.

  • Open mail app, go to inbox, click load 25 more button. Wait the items to be loaded. Check existing items flicker on new items loaded or not.

Technical details

Custom EllipsizingTextView is executing expensive string operations (concat & substring) on every messageListItem's onDraw call. Everytime notifyDataSetChanged is called, this expensive opertion excuted & user can experience the flickering. the operation cannot be transfer to any other place (because it is adding the ellipsize for multiline textView & this is must done in onDraw method), replacing EllipsizingTextView with TextView resolve this issue.

Screenshots

ScreenRecord-2022-03-09-18-07-16

Check list

  • Self review
  • Test procedure explained
  • Tested on fresh install
  • Tested applied as an update
  • License
  • Internal documentation
  • User documentation
Edited by Fahim Salam Chowdhury

Merge request reports

Loading