Skip to content

Commit

Permalink
removed optimization during onLayout
Browse files Browse the repository at this point in the history
optimization in onLayout led to edge-cases where viewport was not
updated when changing zoom or position programmatically - this commit
should patch those instances.
  • Loading branch information
moagrius committed Dec 25, 2013
1 parent beeae47 commit 728c9c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/com/qozix/tileview/TileView.java
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ public void destroy() {
* Appropriate for Activity.onResume
*/
public void resume(){
updateViewport();
tileManager.requestRender();
sampleManager.update();
pathManager.setShouldDraw( true );
Expand All @@ -717,6 +718,7 @@ public void resume(){
* Request the TileView reevaluate tile sets, rendered tiles, samples, invalidates, etc
*/
public void refresh() {
updateViewport();
tileManager.updateTileSet();
tileManager.requestRender();
sampleManager.update();
Expand All @@ -732,10 +734,8 @@ public void refresh() {
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout( changed, l, t, r, b );
if ( changed ) {
updateViewport();
requestRender();
}
updateViewport();
requestRender();
}

// let the zoom manager know what tiles to show based on our position and dimensions
Expand Down

0 comments on commit 728c9c2

Please sign in to comment.