Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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













```