Closed drshavit closed 6 years ago
not sure, just log out values. maybe getScrollX() == getBaseWidth()
?
no, I tried that.. I have searched through the entire values and can't find it. What causes the view to 'stop' when it gets to the edges? One of the managers must keep a relative location no?
it's in ZoomPanLayout
, you can see the overriden onScroll
here: https://github.com/moagrius/TileView/blob/master/tileview/src/main/java/com/qozix/tileview/widgets/ZoomPanLayout.java#L536, which is limited by getConstrainedScrollX
: https://github.com/moagrius/TileView/blob/master/tileview/src/main/java/com/qozix/tileview/widgets/ZoomPanLayout.java#L579
getConstrainedScrollX
solved it! thank you
Hi,
I'm creating a map in which when the user reaches one of the sides, a blinking arrow will appear which will send a request for the adjacent map in that direction.
In order to do that, I used
onPanBegin
andonPanEnd
listeners.x
andy
arguments provided byonPanEnd
appear to indicate the top-left corner of the original image size, since when I reach the top left corner of the map - regardless of scale - the values are (0,0). So determining up and left are easy.My problem is with determining whether I have reached the right and/or bottom of the map. I figured it would be simple as
if (map.getBaseWidth() - x == map.getScaledWidth()
, but these values do not seem to match. I searched through the TileView object and could not find any means of determining it.Thanks