Button as a Spinner

Mikael Magnusson
I am a developer
Published in
1 min readJul 31, 2014

I wanted to implement a Spinner (see the official documentation) that when pressed displayed a date picker dialog. I had seen this implemented in a few apps (Tasks and Notes) and thought it would be super easy to implement. It is. But it’s not at all like I imagined.

This is what I was aiming for; a spinner looking button that displays the currently selected date and when pressed brings up a date picker:

What you need to do is to use a simple button and instead of the original style apply this:

(Originally published 2012–06–24)

--

--