I take a picture and pre-save it in an 'ArrayList Bitmap' and before saving the pictures on the map I display them in a 'GridView'. But due to the fact that the 'Bitmap' image is large, they are not displayed correctly in the 'GridView'. I tried to do so before saving

bitmap.setHeight(); bitmap.setWidth(); 

But the studio emphasizes and says that I cannot use these methods. If I understand correctly, this is due to the API.

Advise how to make a picture 50 by 50 pixels?

    1 answer 1

    So I understand that you are looking for a way to scale Bitmap ʻand to the desired size. In this case, use the scaling method to the desired size:

     Bitmap.createScaledBitmap(originalBitmal, newWidth, newHeight, isFilter) 

    You can read more on developers.android , as usual.