I have a simple activity which display a fullscreen SVG thanks to this android lib. The SVG displayed is a map and I need to enable zoom/scroll gesture on it. That is why I use this lib, which works perfectly with normal ImageView.
Here, I'm using PhotoView lib attacher to SVGImageView :
PhotoViewAttacher mAttacher;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
LinearLayout layout = new LinearLayout(this);
SVGImageView svgImageView = new SVGImageView(this);
svgImageView.setImageAsset("map.svg");
layout.addView(svgImageView, new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
setContentView(layout);
mAttacher = new PhotoViewAttacher(svgImageView);
}
PhotoView works but it takes like 10 second to apply zoom or scroll gesture.
Do you have any ideas on how I could efficiently scale & scroll in ?
Thank you in advance.