@ NonNull public RequestCreator resizeDimen ( int targetWidthResId , int targetHeightResId ) { Resources resources = picasso . context . getResources ( ) ; int targetWidth = resources . getDimensionPixelSize ( targetWidthResId ) ; int targetHeight = resources . getDimensionPixelSize ( targetHeightResId ) ; return resize ( targetWidth , targetHeight ) ; }
Resize the image to the specified dimension size . Use 0 as desired dimension to resize keeping aspect ratio .