Bottombar: Tab title stuck when tab has Badge

Created on 7 Apr 2016  路  12Comments  路  Source: roughike/BottomBar

Everything works fine until I set a badge on the very last tab to the right (at the edge of the screen), and I press on the tab, the badge disappears normally but when I navigate away, the tab title is stuck still open while the tab has closed. Attached screenshot here: http://imgur.com/wDZwf1B

Great job by the way

bug

Most helpful comment

you gonna submit a PR?

All 12 comments

Are you using the latest version?

1.3.1

I'll investigate.

I can't replicate the issue.

Can you provide some Java code that makes the bug happen?

I also have an issue sort of similar to this, when I call selectTabAtPosition(); the tab gets selected but all the other icons don't shift so it creates an incorrect effect

these appear to all be related: #178 #143 #139

I can confirm. As soon as I add badges, the tabs stop responding properly.

The bug is the handleClick method of class BottomBar

replace the under code

        while (null!=findViewWithTag(TAG_BOTTOM_BAR_VIEW_ACTIVE)){

            View oldTab = findViewWithTag(TAG_BOTTOM_BAR_VIEW_ACTIVE);

            unselectTab(oldTab, true);

            shiftingMagic(oldTab, v, true);

        }
        selectTab(v, true);

instead of

        View oldTab = findViewWithTag(TAG_BOTTOM_BAR_VIEW_ACTIVE);

        unselectTab(oldTab, true);
        selectTab(v, true);

        shiftingMagic(oldTab, v, true);

in 1023 line

you gonna submit a PR?

Hi,
I'm also observing issue when adding a badge to a tab element. (Nexus 4 with 4 tabs)
Strangely, after rotating the screen to landscape, the issue is not observed, and if rotating back to portrait, if the selected item is not the first one, the issue is not observed any more!
BR

It seems to be fixed on version 1.3.7 ;-)

Was this page helpful?
0 / 5 - 0 ratings