Android 9-Patch Images Basic rounded corners

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

The key to correctly stretching is in the top and left border.

The top border controls horizontal stretching and the left border controls vertical stretching.

This example creates rounded corners suitable for a Toast.

9-Patch rounded corners example

The parts of the image that are below the top border and to the right of the left border will expand to fill all unused space.

This example will stretch to all combinations of sizes, as shown below:

enter image description here



Got any Android Question?