Skip to content

Conversation

@MihaiCristianCondrea
Copy link
Owner

Summary

  • update MainActivity to apply fade-through motion for top-level navigation and respect system animation settings
  • add Material-style fade-through animation resources and remove the unused spring-based animations

Testing

  • ./gradlew test (fails: Android SDK not installed in container)

https://chatgpt.com/codex/tasks/task_e_68cefb8d6ce0832d8febf638f866a40a

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +306 to +313
private NavOptions.Builder applyTopLevelNavAnimations(NavOptions.Builder builder) {
if (ValueAnimator.areAnimatorsEnabled()) {
builder.setEnterAnim(R.anim.fragment_top_level_enter)
.setExitAnim(R.anim.fragment_top_level_exit)
.setPopEnterAnim(R.anim.fragment_top_level_enter)
.setPopExitAnim(R.anim.fragment_top_level_exit);
} else {
builder.setEnterAnim(0)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P0] Guard ValueAnimator.areAnimatorsEnabled for pre-O devices

applyTopLevelNavAnimations now calls ValueAnimator.areAnimatorsEnabled() unconditionally. That API was added in Android O, but the app’s minSdk is 23, so any device running API 23–25 will crash with NoSuchMethodError as soon as this helper executes (e.g., on app start when navigation is set up). Please gate the call behind a Build.VERSION.SDK_INT >= Build.VERSION_CODES.O check or fall back to querying Settings.Global.ANIMATOR_DURATION_SCALE.

Useful? React with 👍 / 👎.

Comment on lines +1 to +14
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<scale
android:duration="300"
android:startOffset="90"
android:fromXScale="0.92"
android:fromYScale="0.92"
android:toXScale="1"
android:toYScale="1"
android:pivotX="50%"
android:pivotY="50%"
android:interpolator="@android:interpolator/fast_out_extra_slow_in" />
<alpha

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Avoid using platform interpolator absent on minSdk

The new fade-through resources reference @android:interpolator/fast_out_extra_slow_in, which was introduced well after API 23. When this animation is inflated on older devices the resource ID is missing and Resources.NotFoundException will be thrown, breaking every top-level navigation transition on those devices. Consider providing a compat interpolator (e.g., via androidx.interpolator or a custom resource packaged in the app) or guard usage by API level.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants