9 Patch Images are used where a raster image is required to expand according to the content without getting distorted. For e.g. the chat boxes or bubbles, if they have a sharp corner they will enlarge just fine but if they have rounded corners then they will distort badly when enlarged.
Once again here Android Asset Studio written by Google’s Design Advocate Roman Nurik comes to the rescue.
Technical information about 9 patch images.
Follow the steps mentioned below to create your very own 9 patch image.
Sometimes the optimization isn’t perfect. The same 9 patch images can be modified and tested in real time from inside of Android Studio.