ImageViewZoomExtender implements ZoomableComponent { @Override public float getZoomLevel() { return zoomLevel; } ImageViewZoomExtender(ImageView imageView); @Override float getZoomLevel(); @Override void restore(ZoomInfo zoomInfo); @Override ZoomInfo save(); void zoomTo(float targetLevel); void zoomTo(float targetLevel, PointF zoomPoint); @Override void zoomTo(float targetLevel, float zoomX, float zoomY); void panTo(PointF difference); @Override void panTo(float dx, float dy); static final int DEFAULT_MATRIX_SIZE; static final int NONE_DEF_STYLE; static final float ORIGINAL_LEVEL; }
@Test public void zoomLevelShouldBeOriginalLevelWhenExtenderIsCreated() { ImageView imageView = new ImageView(Robolectric.application); ZoomableComponent extender = new ImageViewZoomExtender(imageView); assertTrue(extender.getZoomLevel() == ImageViewZoomExtender.ORIGINAL_LEVEL); }