android-zoom-view icon indicating copy to clipboard operation
android-zoom-view copied to clipboard

ZoomView and ScrollView problem

Open miladrasooli opened this issue 10 years ago • 9 comments

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.

miladrasooli avatar Apr 17 '14 12:04 miladrasooli

Hi miladrasooli, i have same problem. Do you have solution for it?

rinlv avatar Jun 25 '14 10:06 rinlv

the same problem ,for help !

luckyjmcc avatar Jan 05 '16 09:01 luckyjmcc

Got the same problem too. Please help.

allenatwork avatar Mar 16 '16 11:03 allenatwork

I have the same problem too. Someone can help ??

algibe avatar Jun 16 '16 08:06 algibe

i have same problem. i have a GridView in HorizontalScrollView and when zoom GridView many columns of GridView not show.

rezaeareza avatar Aug 28 '16 14:08 rezaeareza

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) {

        }
    });

}

}

rezaeareza avatar Aug 28 '16 14:08 rezaeareza

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.

rezaeareza avatar Aug 28 '16 14:08 rezaeareza

still same issue

SagarPanwala avatar Jan 22 '19 18:01 SagarPanwala

Hello, Unfortunately this project is no longer maintained. Best Regards

dariuszseweryn avatar Jan 31 '19 13:01 dariuszseweryn