GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Proposal: Frame-owned Android interactive back previews without changing native history · Issue #11557 · NativeScript/NativeScript

Proposal: Frame-owned Android interactive back previews without changing native history #11557

New issue
Copy link
New issue
Copy link
Open
Open
Proposal: Frame-owned Android interactive back previews without changing native history#11557
Copy link
Labels
featureframeos: android

Description

@rafaelaugustos
rafaelaugustos
opened on Oct 20, 2026
Issue body actions

Need

Native routers can receive Android 14+ back progress through AndroidX, but Frame exposes only the final goBack(). A router that previews the previous Page currently has to temporarily parent its retained Android view itself, competing with Frame/Fragment ownership during cancellation or recreation.

Audited Core 9.1.3 and upstream main 3224f1b: Frame maintains its own logical back stack and uses FragmentTransaction.replace without addToBackStack. Enabling FragmentManager predictive pop is therefore not a drop-in change. Related investigation: rafaelaugustos/vue-router-ns#62.

Proposed experimental boundary

A presentation-only Frame.beginBackPreview() session with update(progress, edge), cancel(), finish(): Promise<boolean> and dispose(). Frame owns cleanup on navigation, unload, detach and native disposal. finish() does not navigate: a router remains responsible for guards and the final goBack(). Unsupported platforms/content return undefined.

The prototype renders the previous Page into a bounded Android bitmap/ImageView instead of parenting the live Page. No Page activation or Fragment back-stack transaction occurs during the gesture. Surface/TextureView content, secure windows, custom/shared transitions and oversized snapshots decline the session. This trades capture time/memory and a static preview for simpler ownership; it is not proposed as a default replacement until the tradeoffs are accepted.

Local native tests already cover actual system gestures, cancellation, guarded completion, modal inner stacks, replace/clearHistory and interruption. Native weak-reference checks verify snapshot bitmap collection. Tests and comparison traces will accompany the PR.

Recreation prerequisite found during the prototype

A plain NativeScript Frame can attach its new Android view while the recreated Activity is still INITIALIZED. _onAttachedToWindow() returns early; when the Activity reaches CREATED and the Frame loads, there is no second native attach event. Frame's _attachedToWindow stays false and a subsequent Back remains queued.

The candidate resolves the owning Activity and rechecks an already-attached native view in onLoaded(). The same-process recreation tests pass with both the legacy and prototype previews on Android API 34/35/36, retaining Page identities/draft state and allowing Back afterward. This is a small prerequisite correction, not a migration to FragmentManager's back stack.

A standalone NativeScript reproduction and automated native tests will be included with the implementation. Existing apps keep their navigation behavior; the new preview remains opt-in.

Activity

  1. NathanWalker
    added
    feature
    frame
    os: android
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureframeos: android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.