Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sakebook/reachability
You can easily access the top of the screen in Android. Like a iPhone 6 & 6 Plus.
https://github.com/sakebook/reachability
android animation library reachability ui
Last synced: 7 days ago
JSON representation
You can easily access the top of the screen in Android. Like a iPhone 6 & 6 Plus.
- Host: GitHub
- URL: https://github.com/sakebook/reachability
- Owner: sakebook
- License: apache-2.0
- Created: 2014-09-10T14:54:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-20T08:46:30.000Z (almost 9 years ago)
- Last Synced: 2024-10-19T07:37:27.975Z (2 months ago)
- Topics: android, animation, library, reachability, ui
- Language: Java
- Homepage:
- Size: 1.69 MB
- Stars: 258
- Watchers: 10
- Forks: 45
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Reachability-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1283)
Reachability on Android
============
Easy access on top.
Like a iPhone 6 & 6 Plus.![image](https://raw.githubusercontent.com/sakebook/Reachability/master/images/demo.gif)
[demo apk](https://raw.githubusercontent.com/sakebook/Reachability/master/apk/demo-debug.apk)
---
## Usage
Add dependencies```gradle
compile 'com.github.sakebook:Reachability:0.2.0@aar'
```In Activity `onCreate`
```java
Reachability reachability = new Reachability(this);
reachability.makeHoverView(Reachability.Position.RIGHT);
```## Option
### Use own trigger
* `switchBack`
* If you call this method, allows you to move the screen.
* Animation does not overlap.
* `switchHover`
* If you call this method, allows you to move the Hover.
* Animation does not overlap.### Show status bar
* `canTouchableBackView`
* if you call this method, You must write the AndroidManifest.xml the following code.```xml
...
...
``````java
reachability.canTouchableBackView(true);
```## Custom
### HoverView custom
* `setHoverView`
* `setCustomSlideInAnimation`
* `setCustomSlideOutAnimation````java
// 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());
```Sample in project [demo](https://github.com/sakebook/Reachability/tree/master/demo)
## LICENSE
```
Copyright (C) 2014 Shinya SakemotoLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```