Android 9-Patch Images Basic spinner

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 Spinner can be reskinned according to your own style requirements using a Nine Patch.

As an example, see this Nine Patch:

Spinner Nine Patch Example

As you can see, it has 3 extremely small areas of stretching marked.

The top border has only left of the icon marked. That indicates that I want the left side (complete transparency) of the drawable to fill the Spinner view until the icon is reached.

The left border has marked transparent segments at the top and bottom of the icon marked. That indicates that both the top and the bottom will expand to the size of the Spinner view. This will leave the icon itself centered vertically.

Using the image without Nine Patch metadata:

Spinner Image without Nine Patch

Using the image with Nine Patch metadata:

Spinner Image with Nine Patch



Got any Android Question?