'nine-patch Image vs regular Bitmap Image
Different between nine-patch Image vs regular Bitmap Image in Android. and where we use nine-patch Image and where we use regular Bitmap Image.
Solution 1:[1]
9 patch images allow you to choose the area of the image that can be scaled and the area that should keep unscaled, unlike the regular images that are scaled along height and width in the same way.
For example this image, where the corners will not be scaled
It is useful for layouts that can vary greatly in size.
To control scaling in regular images you can use ScaleType property of ImageView
Solution 2:[2]
These description from Google search: What Are 9 Patch Images
https://github.com/chrislondon/9-Patch-Image-for-Websites/wiki/What-Are-9-Patch-Images
Google Slideshow: https://docs.google.com/present/view?id=dc7ghz8w_34f8338rcg
very very helpful tool to understand 9 patch image: https://romannurik.github.io/AndroidAssetStudio/nine-patches.html#source.type=image&sourceDensity=320&name=logo_cbfea26
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | destresa |
Solution 2 |