download manager scaling issues
This commit is contained in:
parent
4e1cbfe7d5
commit
da044752b5
1 changed files with 18 additions and 8 deletions
|
@ -55,7 +55,7 @@ public class BInstallerView extends View
|
||||||
|
|
||||||
private int[] tileStatus;
|
private int[] tileStatus;
|
||||||
|
|
||||||
private boolean tilesVisible = true;
|
private boolean tilesVisible = false;
|
||||||
|
|
||||||
private long availableSize;
|
private long availableSize;
|
||||||
private String baseDir;
|
private String baseDir;
|
||||||
|
@ -287,11 +287,9 @@ public class BInstallerView extends View
|
||||||
|
|
||||||
viewscale = scaleX < scaley ? scaleX : scaley;
|
viewscale = scaleX < scaley ? scaleX : scaley;
|
||||||
|
|
||||||
float startscale = viewscale*3.2f;
|
|
||||||
|
|
||||||
mat = new Matrix();
|
mat = new Matrix();
|
||||||
mat.postScale( startscale, startscale, imgwOrig, imghOrig*0.3f );
|
mat.postScale( viewscale, viewscale );
|
||||||
tilesVisible = true;
|
tilesVisible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BInstallerView(Context context) {
|
public BInstallerView(Context context) {
|
||||||
|
@ -393,8 +391,8 @@ public class BInstallerView extends View
|
||||||
}
|
}
|
||||||
if ( !tilesVisible )
|
if ( !tilesVisible )
|
||||||
{
|
{
|
||||||
paint.setTextSize(40);
|
paint.setTextSize(35);
|
||||||
canvas.drawText( "Zoom in to see grid!", 30, (imgh/3)*2, paint);
|
canvas.drawText( "Touch region to zoom in!", 30, (imgh/3)*2, paint);
|
||||||
}
|
}
|
||||||
paint.setTextSize(20);
|
paint.setTextSize(20);
|
||||||
|
|
||||||
|
@ -578,7 +576,19 @@ float tx, ty;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isDownloading || !tilesVisible ) break;
|
if ( !tilesVisible )
|
||||||
|
{
|
||||||
|
float scale = currentScale();
|
||||||
|
if ( scale > 0f && scale < 5f )
|
||||||
|
{
|
||||||
|
float ratio = 5f / scale;
|
||||||
|
mat.postScale( ratio, ratio, event.getX(), event.getY() );
|
||||||
|
tilesVisible = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isDownloading ) break;
|
||||||
|
|
||||||
Matrix imat = new Matrix();
|
Matrix imat = new Matrix();
|
||||||
if ( mat.invert(imat) )
|
if ( mat.invert(imat) )
|
||||||
|
|
Loading…
Reference in a new issue