android-zoom-view
android-zoom-view copied to clipboard
ZoomView and ScrollView problem
Hello and thank you for this great widget, I have a problem with ZoomView and ScrollView, When I put ZoomView intro scrollView it does zoom in but the scrollable area gets smaller and the user can not scroll for example to the top or the bottom of scrollView. It also happens when I put scrollview into the zoomable area like this:
View v = ((LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.zoomablelayout, null, false);//zoomablelayout contains scrollview
RelativeLayout.LayoutParams params=new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.FILL_PARENT);
v.setLayoutParams(params);
ZoomView zoomView = new ZoomView(this);
zoomView.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.FILL_PARENT));
zoomView.addView(v);
RelativeLayout main_container = (RelativeLayout) findViewById(R.id.main_container);
main_container.addView(zoomView);
Thank you.
Hi miladrasooli, i have same problem. Do you have solution for it?
the same problem ,for help !
Got the same problem too. Please help.
I have the same problem too. Someone can help ??
i have same problem. i have a GridView in HorizontalScrollView and when zoom GridView many columns of GridView not show.
public class MainActivity extends ActionBarActivity { GridView gv; zoom z;
HorizontalScrollView hs;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
gv=(GridView)findViewById(R.id.grid);
hs=(HorizontalScrollView)findViewById(R.id.hs);
z=(zoom)findViewById(R.id.zoom);
gv.setAdapter(new GridAdapter(this));
FrameLayout.LayoutParams linearParams = (FrameLayout.LayoutParams)gv.getLayoutParams();
linearParams.width=100*20;
gv.setLayoutParams(linearParams);
gv.setColumnWidth(100);
hs.postDelayed(new Runnable() {
public void run() {
hs.fullScroll(HorizontalScrollView.FOCUS_RIGHT);
}
}, 100L);
z.setListner(new zoom.ZoomViewListener() {
@Override
public void onZoomStarted(float zoom, float zoomx, float zoomy) {
FrameLayout.LayoutParams linearParams = (FrameLayout.LayoutParams)gv.getLayoutParams();
linearParams.width=(int)(100*20*zoom)+1;
gv.setLayoutParams(linearParams);
}
@Override
public void onZooming(float zoom, float zoomx, float zoomy) {
}
@Override
public void onZoomEnded(float zoom, float zoomx, float zoomy) {
}
});
}
}
I use setListener for change width of GridView when zoom in or zoom out. but sometimes many columns of gridView not show and remains white space in right of GridView. my code work fine but sometimes when zoom in with double tab show 17 or 15 columns and 3 columns not show. Help me.
still same issue
Hello, Unfortunately this project is no longer maintained. Best Regards