Skip to content

fix(android): switch columns in one frame without blank or fading rows - #22

Merged
SectionTN merged 1 commit into
mainfrom
fix/android-column-switch
Nov 22, 2026
Merged

SectionTN merged 1 commit into
mainfrom
fix/android-column-switch

Conversation

@SectionTN

@SectionTN SectionTN commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

changing numColumns on Android showed two blank frames, then faded the rows in over four more. every row binds again through notifyDataSetChanged, which RecyclerView animated as new rows fading in from transparent, and the new layout manager laid out from a posted pass one frame after the props. a rebind of every row now lays out without item animations, and a new layout manager lays out at the end of the prop update that made it.

Summary by CodeRabbit

  • New Features
    • Added a callback for full list rebinds.
    • Added control over whether list item changes animate or settle immediately.
  • Improvements
    • Layout updates are measured and applied immediately when a layout change is pending and the view has nonzero dimensions.
    • View updates now complete post-update processing after property changes.

Changing numColumns showed two blank frames, then faded the rows in over four more. Every row
binds again through notifyDataSetChanged, which RecyclerView animated as new rows fading in from
transparent, and the new layout manager laid out from a posted pass one frame after the props.
A rebind of every row now lays out without item animations, and a new layout manager lays out
at the end of the prop update that made it.
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Android view now handles item animations during adapter rebinds and performs pending layout work after property updates. The view manager calls afterProps() after each update transaction.

Changes: Android rebind and layout updates

Layer / File(s) Summary
Rebind animation handling
android/src/main/java/me/sectiontn/flume/FlumeAdapter.kt, android/src/main/java/me/sectiontn/flume/FlumeItemAnimator.kt, android/src/main/java/me/sectiontn/flume/FlumeView.kt
FlumeAdapter invokes a callback during rebind. FlumeView uses it to enable immediate animation settling until layout completion.
Post-update layout handling
android/src/main/java/me/sectiontn/flume/FlumeView.kt, android/src/main/java/me/sectiontn/flume/FlumeViewManager.kt
After an update transaction, the manager calls afterProps(). The view measures and lays out when layout is pending and its dimensions are nonzero.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant FlumeAdapter
  participant FlumeView
  participant FlumeItemAnimator
  FlumeAdapter->>FlumeView: invoke onRebindAll callback
  FlumeView->>FlumeItemAnimator: set still to true
  FlumeItemAnimator->>FlumeItemAnimator: settle animations immediately
  FlumeView->>FlumeItemAnimator: set still to false after layout
Loading

Possibly related PRs

Merge Risk: Minimal · up to 782da

This change makes Android column switches settle in one frame by finishing item animations during a full rebind and laying out synchronously after property updates. No blocking issue was identified. A brief leftover fade or slide on a row that was mid-animation during a rebind is possible but unconfirmed and low impact.

Security architecture risk: Minimal · up to 782da

The changes affect rendering timing and temporary animation state within individual Android views. The inspected change establishes no material regression in security, data ownership, rollback, or failure containment.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated new effects are scoped to native view presentation and its update call stack. The callback changes a per-view animation flag; the existing store-selection and attachment paths are not expanded by the inspected delta. No new attacker-controlled route to greater store or system authority was established.

Resilience and Maintainability Implications

  • inferred — If layout completion is interrupted or delayed, still can remain set until a subsequent hooked layout completes. Its direct added behavior is immediate animation completion within that view, not a persistent configuration or authority change. This does not establish a security-relevant stranded state.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the Android fix that switches columns (numColumns) in one frame, without blank or fading rows. The changeset supports this. FlumeItemAnimator with a still flag disable…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the Android fix that switches columns (numColumns) in one frame, without blank or fading rows. The changeset supports this. FlumeItemAnimator with a still flag disables item animations during a full rebind, and FlumeView and FlumeViewManager lay out the new layout manager at the end of the prop update. The title is specific and matches the PR objectives, though it does not mention the new animator class.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 93292d29-e6c4-4447-ac2b-b92f72bb4217
Commits

Reviewing files that changed from the base of the PR and between a073a33 and 782da0c.

Files selected for processing: 4

  • android/src/main/java/me/sectiontn/flume/FlumeAdapter.kt
  • android/src/main/java/me/sectiontn/flume/FlumeItemAnimator.kt
  • android/src/main/java/me/sectiontn/flume/FlumeView.kt
  • android/src/main/java/me/sectiontn/flume/FlumeViewManager.kt

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@SectionTN
SectionTN merged commit 08d4772 into main Nov 22, 2026
5 checks passed
@SectionTN
SectionTN deleted the fix/android-column-switch branch November 22, 2026 19:35
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.

1 participant