Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selection/unselection when using badges #271

Merged
merged 1 commit into from
Jun 5, 2016

Conversation

henhal
Copy link
Contributor

@henhal henhal commented Jun 2, 2016

When using badges, an extra FrameLayout is inserted as the container
for each tab. This container inherits the tag of the pre-badge tab view,
but the tag is not reset on the pre-badge tab view. This causes selection
and unselection of tabs to fail because findViewWithTag will erroneously
find the now obsolete tab views when searching for active tabs, resulting
in multiple tabs being visually selected when changing tabs.

By clearing the tag of the old (now inner) view when putting it in the new
tab container, we can ensure that findViewWithTag will only find relevant
views.

This fixes #266.

When using badges, an extra FrameLayout is inserted as the container
for each tab. This container inherits the tag of the pre-badge tab view,
but the tag is not reset on the pre-badge tab view. This causes selection
and unselection of tabs to fail because findViewWithTag will erroneously
find the now obsolete tab views when searching for active tabs, resulting
in multiple tabs being visually selected when changing tabs.

By clearing the tag of the old (now inner) view when putting it in the new
tab container, we can ensure that findViewWithTag will only find relevant
views.

This fixes roughike#266.
@roughike roughike merged commit e3f2e9e into roughike:master Jun 5, 2016
@JorisPotier
Copy link

Hi,

@roughike : since the commit 6f6a8b3 the methods no longer exists. Does it mean that the functionnality has been removed ?

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Presence of badges messes up unselection of tabs
3 participants