I have an banner at the bottom of the screen, and would like to use setScaleX + setScaleY to zoom it to fit the screen width.
Before and after:
The main different is that, the bottom part of the image is clipped after scaling (you can see the bottom part of the White Horn in the banner is cut)
Below is my code (adView is the banner which dimension is 320x50)
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
float scale = metrics.widthPixels / metrics.density / 320;
adView.setScaleX(scale);
adView.setScaleY(scale);
Any solution? Thanks!
p.s. Some may suggest using Smart Banner as the AdSize of the AdView. However, I can't use Smart Banner for some reasons so I can only play with setScaleX/Y to do the trick.