Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ncornette/zoomableview
A base view implementing Zoom, Scale, Scroll, Fling
https://github.com/ncornette/zoomableview
Last synced: 3 days ago
JSON representation
A base view implementing Zoom, Scale, Scroll, Fling
- Host: GitHub
- URL: https://github.com/ncornette/zoomableview
- Owner: ncornette
- License: other
- Created: 2013-12-16T11:05:13.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-17T21:24:39.000Z (almost 10 years ago)
- Last Synced: 2023-03-23T12:16:46.388Z (over 1 year ago)
- Language: Java
- Size: 1.5 MB
- Stars: 18
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
ZoomableView
============A base view implementing Zoom, Scale, Scroll, Fling
![ZoomView Anim](https://github.com/ncornette/ZoomableView/raw/master/demo/anim.gif)
### How-to :
* Insert the view in your layout :
```xml
```
* Define a static picture to display by using `mapref` attribute :
```xml
app:mapref="@drawable/chicken_cartoon_500"
```* Grab the instance of `ZoomView` from you activity to control the zoom level, etc...
```java
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);final ZoomView zoomable = (ZoomViewTouchable) findViewById(R.id.zoomable);
}
```* Instead of using `mapref` attribute, you can provide your own bitmap, so you can draw through its canvas :
```java
Bitmap bmp;
...
zoomable.setMap(bmp)
```### Attributes :
Zoom view can also handle some extra attributes :
```xml
```