【开源】Reachability
Reachability
- https://github.com/sakebook/Reachability
介绍:
类似于iPhone 6 & 6 Plus的下拉悬停效果,让你更容易操作视图的最上面。运行效果:
![]()
使用说明:
在activity的oncreate中
|
1
2
|
Reachability reachability = new Reachability(this);reachability.makeHoverView(Reachability.Position.RIGHT); |
自定义
|
1
2
3
4
5
6
7
8
9
10
11
|
// Make Own HoverView. Support only ImageView.ImageView view = new ImageView(this);view.setBackgroundResource(R.drawable.custom_button_selector);view.setScaleType(ImageView.ScaleType.CENTER);...mReachability = new Reachability(this);// Should call before makeHoverView!mReachability.setHoverView(view, android.R.drawable.ic_partial_secure, android.R.drawable.ic_secure);mReachability.makeHoverView(Reachability.Position.CENTER);mReachability.setCustomSlideInAnimation(1000, new AnticipateOvershootInterpolator(), fromLeftAnimation());mReachability.setCustomSlideOutAnimation(1000, new AnticipateOvershootInterpolator(), toRightAnimation());
|
posted on 2015-04-09 09:45 wasdchenhao 阅读(152) 评论(0) 收藏 举报

浙公网安备 33010602011771号