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

Can not use gravity offset with center gravity properties #56

Open
luongvo opened this issue Nov 8, 2017 · 1 comment
Open

Can not use gravity offset with center gravity properties #56

luongvo opened this issue Nov 8, 2017 · 1 comment

Comments

@luongvo
Copy link

luongvo commented Nov 8, 2017

When I using this lib to make badge numbers with https://github.com/ittianyu/BottomNavigationViewEx. I write the code as below to bind the badge view into the navigation item view:

badges.add(new QBadgeView(this)
                .bindTarget(binding.bnvHome.getBottomNavigationItemView(position))
                .setBadgeGravity(Gravity.CENTER)
                .setGravityOffset(8, -6, true)
                .setBadgePadding(0, true)
                .setBadgeTextSize(7, true)
                .setBadgeBackgroundColor(ContextCompat.getColor(this, R.color.badge))
                .setBadgeTextColor(ContextCompat.getColor(this, R.color.badge))
                .stroke(ContextCompat.getColor(this, R.color.badge_text), 2, true)
                .setShowShadow(false));

The problem is I can not use gravity offset with center gravity to display a badge number relative to the navigation icon, instead relative to navigation view frame layout.

@luongvo
Copy link
Author

luongvo commented Nov 8, 2017

#55 resolve this issue

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