-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Scrollbars #29
Comments
Thanks! You should override onUpdate(). And get X and Y from the matrix (or ask the engine). Take a look at the ZoomLayout source code, it's pretty simple. I think it would be in scope for both ZoomLayout and ZoomImageView so if you work this out feel free to submit a PR. Note, here we would want to let Android draw them using the view callbacks, not draw 'custom' scrollbars onDraw |
I'm not sure I can follow you on "let Android draw them using the view callbacks". As far as I can tell neither FrameLayout nor ImageView have built in support for scrollbars? So the only way to show scrollbars would be to add them by hand and update their position using the onUpdate() method. Do you simply mean to use "Views" (added to the FrameLayout) which android draws instead of manually drawing rectangles in onDraw? |
It's been a long time but as far as I remember, But the view must implement a few methods, like So if I remember correctly, you should just implement this 2? 4? methods by using the engine values. A good starting point might be the NestedScrollView source code from Google. |
Oh and you should call |
Thx for the help, now I understand 😊 I will look into implementing this somewhere around (hopefully) this or next week. |
Hey, awesome library :)
I want to use this to build a Text Editor and want to add scrollbars for both x and y axis.
Is there some kind of listener/callback API that I missed to intercept changes in the current positioning of the ZoomLayout? If so I would be able to implement scrollbars myself and update them even when "flinging" the position.
It would also be cool to have something like this (scrollbars) built in - although it might be out of scope for this library.
Thx for the great work.
The text was updated successfully, but these errors were encountered: