You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Respect system Reduce Motion in the dictionary selection popup - #45
The exported DictionaryActivity handles Android ACTION_PROCESS_TEXT selections. Its bottom definition popup currently always runs spring-based fadeIn + scaleIn + slideInVertically and animateContentSize, even when the user has disabled system animations.
The app's minimum SDK is 26, so Android's ValueAnimator.areAnimatorsEnabled() is available. Android documents it as the system-wide animator state; it returns false when the developer animator scale is zero or Battery Saver disables animations. This avoids introducing a settings observer or timer:
The active integration PR #34's own UI roadmap identifies this exact popup as the next Reduce Motion candidate; no equivalent open PR exists.
Change
Read ValueAnimator.areAnimatorsEnabled() once when the short-lived popup composition is created.
Preserve the existing spring entrance and content-size animation when system animations are enabled.
Use EnterTransition.None and omit animateContentSize when system animations are disabled.
Keep Android 12+ FLAG_BLUR_BEHIND, the existing high-contrast fallback, popup geometry, haptics, offline WordNet lookup, and the native text-selection/action-mode menu unchanged.
Add a small pure policy and two JVM tests for enabled/disabled system animation states.
Verification
Changes are isolated to DictionaryActivity.kt, DictionaryMotionPolicy.kt, and DictionaryMotionPolicyTest.kt.
No new dependency, permission, network request, timer, observer, persistence, or navigation destination.
Tests added but not executed. Canonical main's workflow remains push-only; no manual workflow dispatch or rerun was used.
No OPPO device screenshot, accessibility-service or runtime Reduce Motion verification was available.
Risk / limitation
The preference is sampled once per popup instance. Changing the system animation setting while the popup is already open will take effect the next time it is opened; this deliberately avoids a lifecycle-sensitive observer for a transient surface.
The same Reduce Motion behaviour and DictionaryMotionPolicyTest have now been ported into the active integration branch black-box-bihar-news in commit 21317fd4f3dc625c4e49ec598e59736e0a4b6237 (alongside the branch's continuity/roadmap updates).
Natural integration runs on that exact head both passed:
Run #385 completed WordNet generation, :app:testDebugUnitTest, :app:assembleDebug, and artifact upload. The test APK artifact is 13644482167, 39,129,205 bytes, SHA-256 55357f9ff060bd1881c42cba2465660c365ce5331bbe2e53882726c6158b0c62, expiring 23 November 2026.
This verifies the equivalent implementation/tests in the integration branch, not this standalone PR head fbadd56e0e119cf70b865af8a58843190cce249d; the standalone head still has no check runs because canonical main's workflow is push-only. Keep the two paths coordinated: if PR #34 lands with this code, do not separately merge this duplicate implementation. Physical-device Reduce Motion/TalkBack verification remains outstanding.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Evidence
The exported
DictionaryActivityhandles AndroidACTION_PROCESS_TEXTselections. Its bottom definition popup currently always runs spring-basedfadeIn + scaleIn + slideInVerticallyandanimateContentSize, even when the user has disabled system animations.The app's minimum SDK is 26, so Android's
ValueAnimator.areAnimatorsEnabled()is available. Android documents it as the system-wide animator state; it returns false when the developer animator scale is zero or Battery Saver disables animations. This avoids introducing a settings observer or timer:The active integration PR #34's own UI roadmap identifies this exact popup as the next Reduce Motion candidate; no equivalent open PR exists.
Change
ValueAnimator.areAnimatorsEnabled()once when the short-lived popup composition is created.EnterTransition.Noneand omitanimateContentSizewhen system animations are disabled.FLAG_BLUR_BEHIND, the existing high-contrast fallback, popup geometry, haptics, offline WordNet lookup, and the native text-selection/action-mode menu unchanged.Verification
DictionaryActivity.kt,DictionaryMotionPolicy.kt, andDictionaryMotionPolicyTest.kt.Risk / limitation
The preference is sampled once per popup instance. Changing the system animation setting while the popup is already open will take effect the next time it is opened; this deliberately avoids a lifecycle-sensitive observer for a transient surface.
Draft for focused accessibility review.