Picasso: Incomplete documentation

Created on 5 Sep 2018  路  2Comments  路  Source: square/picasso

Many of the methods are not properly documented.

resize() for example doesn't explain what happens when one of the parameters is 0. Is this an intended use case?

Most helpful comment

We are very welcoming to documentation contribution! Not just to you, but for anyone seeing this. We barely have the time to do code changes on this project let alone documentation. It's a very easy way to get involved.

And yes, resize supports 0 and it means that you want that dimension to scale in accordance with the original aspect ratio. So an image with a 2:1 aspect ratio resized as 0, 1000 would get a width of 2000.

All 2 comments

We are very welcoming to documentation contribution! Not just to you, but for anyone seeing this. We barely have the time to do code changes on this project let alone documentation. It's a very easy way to get involved.

And yes, resize supports 0 and it means that you want that dimension to scale in accordance with the original aspect ratio. So an image with a 2:1 aspect ratio resized as 0, 1000 would get a width of 2000.

Sure thing, I'll get around to this later. I'll probably modify RequestCreator's comments to look something like this.

        /**
         * Resize the image to the specified size in pixels.
         * Use 0 as desired dimension to resize keeping aspect ratio.
         * See {@link Request#resize(int , int)}
         */
Was this page helpful?
0 / 5 - 0 ratings