Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZoomView and ScrollView problem #9

Open
miladrasooli opened this issue Apr 17, 2014 · 9 comments
Open

ZoomView and ScrollView problem #9

miladrasooli opened this issue Apr 17, 2014 · 9 comments
Labels

Comments

@miladrasooli
Copy link

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.

@rinlv
Copy link

rinlv commented Jun 25, 2014

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

@luckyjmcc
Copy link

the same problem ,for help !

@allenatwork
Copy link

Got the same problem too. Please help.

@algibe
Copy link

algibe commented Jun 16, 2016

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

@rezaeareza
Copy link

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

@rezaeareza
Copy link

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
Copy link

rezaeareza commented Aug 28, 2016

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.

@SagarPanwala
Copy link

still same issue

@dariuszseweryn
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants