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

How update badge into tab when receiver data from server #7

Open
vanchung opened this issue Jul 21, 2016 · 0 comments
Open

How update badge into tab when receiver data from server #7

vanchung opened this issue Jul 21, 2016 · 0 comments

Comments

@vanchung
Copy link

vanchung commented Jul 21, 2016

java.lang.NullPointerException
at com.dreamm.Milispace.view.slidingtab.StartNiceTab.clearBadge(StartNiceTab.java:177)
at com.dreamm.Milispace.view.slidingtab.StartNiceTab.setBadge(StartNiceTab.java:160)

public void setBadgeActivity(int badgeInbox) {
    clearBadge();
    if (badgeInbox > 0) {
        mNiceTabLayout.setBadge(2, String.valueOf(badgeInbox));
    }
}

private void clearBadge() {
    mNiceTabLayout.clearBadge();
}

public void setBadge(int badgeInbox, int badgeActivity) {
clearBadge();
if (badgeInbox > 0) {
mNiceTabLayout.setBadge(2, String.valueOf(badgeInbox));
}
if (badgeActivity > 0) {
mNiceTabLayout.setBadge(3, String.valueOf(badgeActivity));
}
}

@vanchung vanchung changed the title How update badge tab How update badge into tab when receiver data from server Jul 21, 2016
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

No branches or pull requests

1 participant