Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a Datepicker button look similar to the one in Google calendar app

My app is supposed to have a Datepicker. To invoke the date picker fragment a button is pressed and then the floating date picker appears. My problem is that the button does not look similar to the rest of the UI components being used to accept data. Is there any way I can make the button look and function like the one in Google calendar app?? The date picker button dynamically displays the date chosen too and would like to have that functionality too.

Picks for reference:

My current button:

enter image description here

The type of button I want to achieve: enter image description here

like image 557
krtkush Avatar asked Dec 24 '12 13:12

krtkush


1 Answers

I looked around a bit and was able to change the look by putting the following code in the xml code:

style="@android:style/Widget.DeviceDefault.Light.Spinner"

Here is how to add text to the button.

like image 81
krtkush Avatar answered Oct 06 '22 08:10

krtkush