question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strange Android Back nav behavior

See original GitHub issue

Please, provide the details below:

Did you verify this is a real problem by searching [Stack Overflow]

Yes

Tell us about the problem

Video: https://www.screencast.com/t/1hXgziXKy2oo

So you can see when I navigate back I am clicking around on the items in the Listview (and the events do trigger actually), but no navigation is at all possible. Clicking the back button multiple times though seems to like send me BACK to the “Next” page, like it’s freaking out or something.

Also of note if I use the app and navigate DEEPER (it’s almost like a wizard, like 10 steps deep) the back and forward always works fine, it’s just the one particular simple view that causes the problem… almost like it only happens with 1 item in the navstack.

I even tried doing something like

if(page.isBackNavigation()){
 //frame module code to send them back to home with cleared history
}

…but nothing happens, like I said, all nav functionality freezes ONLY ON BACK

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.2
  • Cross-platform modules: 3.2
  • Runtime(s): 3.2

Please tell us how to recreate the issue in as much detail as possible.

I can provide a private zip of the project if required… I would GUESS

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

See above, can provide privately

<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
sitefinitystevecommented, Sep 28, 2017

Okay yeah firebase isn’t needed,

  1. Set the loading page in app.ts to “./views/home”
  2. Open views\add\step-rotation and set the onNavigatingTo code to
exports.onNavigatingTo = function (args) {
    (<any>global).startTime = new Date();

    indicator = new LoadingIndicator();
    indicator.hide();

    newObservation = new NewObservation();
    page = args.object;

    model = {
        data: new ObservableArray()
    };
    utils.consoleLog("onNavigatingTo");

    model.data.length = 0;
    /*
    Data.GetRotations().then((result) => {
        
    });*/

    var result = [{ "Id": 1, "Name": "Anesthesiology", "Rotation": { "Id": 6, "Name": "Anesthesiology" } }, { "Id": 6, "Name": "Emergency Medicine", "Rotation": { "Id": 19, "Name": "Emergency Medicine" } }, { "Id": 7, "Name": "Family Medicine", "Rotation": { "Id": 22, "Name": "Family Medicine" } }, { "Id": 9, "Name": "Internal Medicine", "Rotation": { "Id": 15, "Name": "Internal Medicine" } }, { "Id": 10, "Name": "Obstetrics and Gynecology", "Rotation": { "Id": 46, "Name": "Obstetrics & Gynecology" } }, { "Id": 11, "Name": "Orthopedic Surgery", "Rotation": { "Id": 47, "Name": "Orthopedic Surgery" } }, { "Id": 12, "Name": "Pediatrics", "Rotation": { "Id": 54, "Name": "Pediatrics" } }, { "Id": 13, "Name": "Psychiatry", "Rotation": { "Id": 26, "Name": "General Psychiatry" } }, { "Id": 8, "Name": "Selectives", "Rotation": { "Id": 60, "Name": "Selective" } }, { "Id": 14, "Name": "Surgery", "Rotation": { "Id": 27, "Name": "General Surgery" } }];
    for (var i = 0; i < result.length; i++) {
        model.data.push(result[i]);
    }

    page.bindingContext = model;

    utils.consoleLog("Stack length: " + frameModule.stack().length);
    utils.consoleLog("Navigation Context: " + JSON.stringify(page.navigationContext));
}
  1. In step2-observation just change the onNavigatingTo to this
exports.onNavigatingTo = function(args) {
    page = args.object;
    indicator = new LoadingIndicator();
    indicator.show();
    newObservation = page.navigationContext;

    model = {
        ClerkshipName: newObservation.ClerkshipName,
        data: new ObservableArray()
    };
/*
    Data.GetTypes(newObservation.ClerkshipId).then((result) => {
        for(var i=0;i<result.length;i++){
            model.data.push(result[i]);
        }
        indicator.hide();
    });
*/
    indicator.hide();    
    page.bindingContext = model;
}

WOnt be any callbacks and it replicates

1reaction
sitefinitystevecommented, Sep 27, 2017

Here we go, sorry about the “size” I left in the platforms so everything would be exactly the same

https://www.dropbox.com/s/4ehs7sru5k7wfj2/Archive.zip?dl=0

cd apps cd macdot

the app.ts needs to start on this item moduleName: utils.isLoggedIn() ? “./views/home” : “./views/login/login”

Login needs to be 2010fake.student1@medportal.ca passpasstest123

On Wed, Sep 27, 2017 at 7:04 AM, Nikolay Tsonev notifications@github.com wrote:

Hi @sitefinitysteve https://github.com/sitefinitysteve, I sent you a message as you mentioned while using the contact form, however, I still have no answer from you. Were you able to resolve the problem?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NativeScript/NativeScript/issues/4853#issuecomment-332486615, or mute the thread https://github.com/notifications/unsubscribe-auth/ABeI6JEfH0BBVTL2MOpe6e6RFxFLGnlnks5smivVgaJpZM4PcuIa .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Jetpack Navigation nested tab backward navigation ...
I have no problem navigating forward, but I couldn't navigate backward properly. For example, when I navigation from A -> B -> C,...
Read more >
Navigating in Jetpack Compose - Medium
Getting navigation right isn't easy with many challenges at hand: back stack handling, lifecycles, state saving and restoration and deep linking ...
Read more >
Strange behavior with Android back button · Issue #37 - GitHub
Hi. I'm using react-route and react-router-navigation with redux. I've setuped 2 links in RootContainer RootContainer.js ... class ...
Read more >
including having multiple back-stacks and saving fragment ...
So I'm wondering whether I need to override the NavController to ensure it is restoring state when the user tabs between fragments on...
Read more >
navigateUp() causes navgraph issue when moving from ...
I'm seeing some strange behaviour when pressing back button and transistion back to a fragment from a fragment of the same id. My...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found