How to implement zoom effect for image view in android?

Lazy man can use this lib, Just import inside your project and ImageView mImageView; PhotoViewAttacher mAttacher; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Any implementation of ImageView can be used! mImageView = (ImageView) findViewById(R.id.iv_photo); // Set the Drawable displayed Drawable bitmap = getResources().getDrawable(R.drawable.wallpaper); mImageView.setImageDrawable(bitmap); // Attach a PhotoViewAttacher, which takes care of all … Read more

Matplotlib plot zooming with scroll wheel

This should work. It re-centers the graph on the location of the pointer when you scroll. import matplotlib.pyplot as plt def zoom_factory(ax,base_scale = 2.): def zoom_fun(event): # get the current x and y limits cur_xlim = ax.get_xlim() cur_ylim = ax.get_ylim() cur_xrange = (cur_xlim[1] – cur_xlim[0])*.5 cur_yrange = (cur_ylim[1] – cur_ylim[0])*.5 xdata = event.xdata # get … Read more

Force page zoom at 100% with JS

You can set zoom property on page load document.body.style.zoom = 1.0 But, zoom is not a standard property for all browsers, I recommend using transform instead. var scale=”scale(1)”; document.body.style.webkitTransform = scale; // Chrome, Opera, Safari document.body.style.msTransform = scale; // IE 9 document.body.style.transform = scale; // General http://jsfiddle.net/5RzJ8/

MKMapView Zoom and Region

First of all, MKMapView does not use/have a predefined set of zoom levels like Google Maps does. Instead, the visible area of a MKMapView is described using MKCoordinateRegion, which consists of two values: center (the center point of the region), and span (the size of the visible area around center). The center point should be … Read more