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

重新设计调用的API #35

Open
imkarl opened this issue Dec 29, 2016 · 0 comments
Open

重新设计调用的API #35

imkarl opened this issue Dec 29, 2016 · 0 comments

Comments

@imkarl
Copy link

imkarl commented Dec 29, 2016

1、重载showTextBadge()showDrawableBadge()
因为都是为了设置Badge徽章的内容,且内容的类型不同。可以通过重载降低使用难度。例如统一成 showBadge()
2、只实现一个BGABadgeView
虽然其他的自定义View可以方便使用,但同样增加了复杂度(即使只做了同一件事)
3、基于�第2点,可以去除mIsShowBadgehiddenBadge()isShowBadge()
这是用于隐藏Badge徽章,以及判断当前的显示状态。但实际上显示隐藏完全可以通过View.setVisibility() 来实现相同功能。在拖动完成时就不要hiddenBadge(),由调用者主动去处理。(类似Dialog.OnDimissListener)

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