Comments (2)
不太明白,拖拽动画一般是跟随着手指触摸的位置,是否可给几个截图加上调试设备?
from jptabbar.
Bug效果如下:
我简单地研究了下作者的源码和demo,发现产生这种情况的原因是因为我的showBadge方法是放在了onCreate中调用的,作者的源码中有两段代码是对画布去除状态栏的偏移处理,例如DragBadgeView 中#199 的代码:
canvas.translate(0, -BadgeViewUtil.getStatusBarHeight(mBadgeViewHelper.getRootView()));
而作者BadgeViewUtil.getStatusBarHeight的方法是通过应用区域的top属性推算的出状态栏的高度
(view.getRootView().getWindowVisibleDisplayFrame(rectangle);
)
而这种方式的弊端也很明显,就是必须依赖窗口回调机制,也就是需要等onWindowFocusChanged执行后才能调用,所以我放到onCreate中调用showBadge时拿到的StatusBarHeight是0,就出现了标题中我所描述的bug。
等会我会PR一个解决方案,作者可以参考一下。
from jptabbar.
Related Issues (20)
- 如果开启混淆的话,需不需要做混淆忽略呢? HOT 2
- 如何使用IconFont作为图标? HOT 1
- 设置默认选中第2个itme,怎么让ViewPager 显示对应的Fragment HOT 1
- 问一个问题,可以动态添加tab吗? HOT 2
- 设置中间按钮不显示 HOT 1
- 我想点击某个tab判断用户是否登录,没登录直接去登录页面。没有这个回调。 HOT 6
- How to change icon of middle view when active HOT 2
- 在Fragment内的Fragment里使用注解不生效 HOT 1
- 图标可以使用网络图片么 HOT 2
- 中间的按钮没有按等比例导致不美观 HOT 2
- 如何支持,只有图片,居中显示 HOT 1
- 多个fragment切换会重新触发onCreatView方法 HOT 1
- mAttribute recycled
- java.lang.RuntimeException: Cannot make calls to a recycled instance! HOT 4
- 文字距底部的距离? HOT 1
- 第一个图标默认选中时,并没有正确显示选中的图标,而是显示的未选中的图标 HOT 2
- 刚打开app是默认选中的icon未生效,显示的还是未选中的icon
- 开启代码混淆时,没有效果
- 凸出按钮位置没有在中间底部,直接出现在左上角,其他的都正常 HOT 1
- 打包正式包时,mainactivity已经加上:@Tittles @NorIcons @SelectIcons注解,但还是报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jptabbar.