【开源】Reachability

Reachability

使用说明:

在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)    收藏  举报

导航