GithubHelp home page GithubHelp logo

[BUG] Android "hardware" back button closes the app when app contains a tabbed page with a navigation page as root page for one of the tabs about prism HOT 1 CLOSED

skha83 avatar skha83 commented on May 29, 2024
[BUG] Android "hardware" back button closes the app when app contains a tabbed page with a navigation page as root page for one of the tabs

from prism.

Comments (1)

skha83 avatar skha83 commented on May 29, 2024

Hi @dansiegel, I have tried the navigation changes introduced in version 9.0.436-pre which should resolve this issue. I'm still having problems getting the navigation to work the way I expect it to work.
I have created a fork on the current Prism main and simplified my example so it only contain one tabbed page with a navigation page and two segments here https://github.com/skha83/Prism

The example code is modified like the following:

.CreateWindow(nav => nav.CreateBuilder()
    .AddTabbedSegment(page =>
            page.CreateTab(t =>
                t.AddNavigationPage()
                 .AddSegment("ViewA")
                 .AddSegment("ViewB")))
    .NavigateAsync())

I have two scenarios and both of them fail.

Scenario 1.

  1. Deploy and launch the PrismMauiDemo app from my repository on an Android phone.
  2. The app is launched with ViewB page on top and ViewA and NavigationPage below.
  3. Press the hardware back button.

Expected result:
The app will navigate from ViewB -> ViewA but stay in foreground so ViewA is visible.

Actual result:
The app navigates to ViewA but immediately backgrounds the app. When the app is opened again ViewA is the current window. But the app is not terminated.

Scenario 2.

  1. Deploy and launch the PrismMauiDemo app from my repository on an Android phone.
  2. The app is launched with ViewB page on top and ViewA and NavigationPage below.
  3. Press the software navigate back button on the top left of the app, so it navigates back to ViewA.
  4. When ViewA is visible press the hardware back button.

Expected result:
The app will be backgrounded but not completely terminated.

Actual result:
The app gets completely terminated and needs to be relaunched and is started from scratch.

The behavior in scenario 1 is different from before the new changes. Previously it would correctly navigate from ViewB -> ViewA and not background the app if the hardware back button is only pressed once.

Scenario 2 is working in the same way as before the recent changes.

I don't know if I shall create a new issue or this issue can get reopened?

from prism.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.