Skip to content

Fix realtime indicator animation not restarting on view recycling#1550

Open
akimovpro wants to merge 1 commit into
OneBusAway:mainfrom
akimovpro:fix/818-realtime-indicator-recycling
Open

Fix realtime indicator animation not restarting on view recycling#1550
akimovpro wants to merge 1 commit into
OneBusAway:mainfrom
akimovpro:fix/818-realtime-indicator-recycling

Conversation

@akimovpro

Copy link
Copy Markdown

Summary

Restart animation when view becomes visible again after being recycled by the list adapter. Clear old animations before starting new ones to prevent stacking.

Fixes #818

Changes

  • Override onVisibilityChanged() in RealtimeIndicatorView to restart animation when view becomes VISIBLE and stop it when hidden
  • Call clearAnimation() at the start of initAnimation() to prevent animation stacking on recycled views

Test plan

  • Open a stop with many arrivals (transit center)
  • Scroll down until initial arrivals go offscreen
  • Scroll back up – indicators should still animate
  • Indicator colors should match "min" text color

  • Apply the AndroidStyle.xml style template to your code in Android Studio.
  • Run the unit tests with gradlew connectedObaGoogleDebugAndroidTest to make sure you didn't break anything
  • If you have multiple commits please combine them into one commit by squashing them for the initial submission of the pull request.

Restart animation when view becomes visible again after being recycled
by the list adapter. Clear old animations before starting new ones to
prevent stacking.

Fixes OneBusAway#818
@CLAassistant

CLAassistant commented Mar 31, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

Realtime indicator view isn't being recycled properly

2 participants