ncapdevi / FragNav

An Android library for managing multiple stacks of fragments
1.5k stars 210 forks source link

set last tab in popFragment #214

Closed mahramane closed 5 years ago

mahramane commented 5 years ago

Hi I am using UniqueTabHistoryStrategy. But I want the first tab (TabIndex), always the last tab after leaving the program when popFragment(). is it possible? please guide me

mahramane commented 5 years ago

i fixed it in the UniqueTabHistoryController.java file and switchTab method, i changed

    tabHistory.remove(index)
    tabHistory.add(index)

to

        if (index == 0) //tabIndex
            tabHistory.clear()
        else
            tabHistory.remove(index)
        tabHistory.add(index)