Skip to content

fix: Fix toolbar flickering when scrolling lists #26

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

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

nikclayton
Copy link
Contributor

Scrolling a thread, set of search results, or viewing a thread would cause the toolbar to flicker as items moved under it.

Fix this by configuring the toolbar to liftOnScroll in the relevant layouts.

It needs to be configured with the view (or ID of the view) that it will be scrolling. For views that are in the same layout this is done with the liftOnScrollTargetViewId attribute.

For views that are in different layouts (e.g. the toolbar is in the activity and the scrolling view is in a fragment) the app bar's setLiftOnScrollTargetView method must be called.

Do this in TimelineFragment if the hosting activity is a new interface AppBarLayoutHost. Implement this interface in StatusListActivity.

Update the relevant layouts to use MaterialToolbar.

Fixes #21

Scrolling a thread, set of search results, or viewing a thread would
cause the toolbar to flicker as items moved under it.

Fix this by configuring the toolbar to `liftOnScroll` in the relevant
layouts.

It needs to be configured with the view (or ID of the view) that it
will be scrolling. For views that are in the same layout this is done
with the `liftOnScrollTargetViewId` attribute.

For views that are in different layouts (e.g. the toolbar is in
the activity and the scrolling view is in a fragment) the app bar's
`setLiftOnScrollTargetView` method must be called.

Do this in `TimelineFragment` if the hosting activity is a new
interface `AppBarLayoutHost`. Implement this interface in
`StatusListActivity`.

Update the relevant layouts to use `MaterialToolbar`.

Fixes pachli#21
@nikclayton nikclayton added this to the Launch 1.1 milestone Sep 11, 2023
@nikclayton nikclayton merged commit ecd81e8 into pachli:develop Sep 11, 2023
@nikclayton nikclayton deleted the 21-toolbar-flicker branch September 11, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Flickering in the toolbar when scrolling in some views
1 participant