How to create android spinner without down triangle on the right side of the widget

This is quite an old question, but I think still relevant, so here’s my answer: Simplest Method lencinhaus answer is correct. It works, but it can be done in an even simpler way: Just add another background to it. The example below uses the standard Button background for a more homogeneous look-and-feel: <Spinner android:id=”@+id/my_spinner” android:layout_width=”wrap_content” … Read more

Create a NinePatch/NinePatchDrawable in runtime

getNinePatchChunk works just fine. It returned null because you were giving Bitmap a “source” ninepatch. It needs a “compiled” ninepatch image. There are two types of ninepatch file formats in the Android world (“source” and “compiled”). The source version is where you add the 1px transparency border everywhere– when you compile your app into a … Read more