Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable fading edges on ListViews #2377

Merged
merged 1 commit into from
May 3, 2022
Merged

Enable fading edges on ListViews #2377

merged 1 commit into from
May 3, 2022

Conversation

SimonMarquis
Copy link
Contributor

Hi P.Y.,
I was wondering what's your stance on fading edges on ListView?

I can't find any reference to it in any PRs/issues so I thought I might as well try.
I know it was kind of a delicate API back in the days for performance reasons:

Using fading edges may introduce noticeable performance degradations and should be used only when required by the application's visual design.

Source: aosp-mirror/platform_frameworks_base@1ef3fdb

IMO it adds some nice separation between what is scrollable and what is not. Also it doesn't seem that impacting on perfs (though I've nothing to back this up).
I've thought about using View's elevation, but I don't think this is backported to API 14 and would require changing many view hierarchies.

Here is what it look like in the Heap Dump Screen:

Without fading edge With fading edge
Screenshot_20220424_234601 Screenshot_20220424_234521

@pyricau pyricau merged commit 013c7fd into square:main May 3, 2022
@pyricau
Copy link
Member

pyricau commented May 3, 2022

Looking great! To be honest I simply did not think about it.

@pyricau pyricau added this to the 2.10 milestone May 3, 2022
@SimonMarquis SimonMarquis deleted the ui/require-fading-edge branch May 3, 2022 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants