scaling - Android - setScaleX/Y makes image clipped -
i have banner @ bottom of screen, , use setscalex + setscaley zoom fit screen width. before , after : the main different that, bottom part of image clipped after scaling (you can see bottom part of white horn in banner cut) below code (adview banner dimension 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. may suggest using smart banner adsize of adview. however, can't use smart banner reasons can play setscalex/y trick. set adsize smart_banner , layout_width match_parent change in xml android:layout_width="match_parent" android:layout_height="wrap_content" ads:adsize="smart_banner"