Tabgroup Problem

I have two tab bar in my app.. One for logged in user and other for not looged in user. When user first time login second tab bar is opening correlcty, The problem occurs when i am creating a logout button and opening the earlier tab bar again. It crahes app in android. Please suggest the cause. Its working fine for iphone

— asked 3 years ago by Gaurav Sood
  • post your code ,it will help to identify your mistake

    — commented 3 years ago by Muhammad Adnan
  • Two Tab Goups
    login.addEventListener('click',function(e) {
      ; // success
    logout.addEventListener('click',function(e) {
                APP.mainTabGroup.close(); // crash    
      ; // crash

    login and logout are buttons

    — commented 3 years ago by Gaurav Sood
  • Hi, Gaurav can you confirm one thing.

    just close the main Tab group. i mean execute this code only:-

    logout.addEventListener('click',function(e) {

    does it still crashes the app?

    — commented 3 years ago by Ashish Nigam
  • yes it crashes the app

    — commented 3 years ago by Gaurav Sood
  • Actually this is the code snippet that crashes the app..


    If i use only this and remove the above code, App doesn't crashes, but it stays on same tabgroup.I mean

    — commented 3 years ago by Gaurav Sood
  • Though First time I am using this


    and its working fine
    for logout I am just shifting the tab bar i.e


    It crashes

    — commented 3 years ago by Gaurav Sood

1 Answer

  • Please see this article where I discuss in great detail the use of multiple tab groups on android.