I want to show a DialogFragment with a DatePicker when the Spinner is clicked. I am not asking for the DialogFragment part, just for how to know when the Spinner is clicked, since you can't implement an onClick handler, only setOnItemSelectedListener (otherwise it gives you an error). Thanks in advance :)
you cant use a spinner to show a dialog, spinners show a dropdown list.
you can however make something look like a spinner that you can register an onCLick listener by changing its style
for example use a textview and set the style to
style="@android:style/Widget.Holo.Light.Spinner"
then you can set an onClick listener on the textview and show the dialog