0

I am working on Customized DateTimePicker in android , which shows Today , Tomorrow , Day after tomorrow as label,

Each day shows its own time slots

Like in Grofers app

I googled for third party library , I couldn't find it .

Please help in this .

Thanks in advance.

enter image description here

karthik kolanji
  • 1,742
  • 1
  • 16
  • 47

3 Answers3

1

You need to create a custom dialog with a your own view where you added a

<NumberPicker
        android:id="@+id/numberPicker1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="64dp" />

You can enter custom data into it, set the min and max values for day that would be 0 and 2 and then set the display values which is a simple string array. For more info about the numberpicker see http://developer.android.com/reference/android/widget/NumberPicker.html

Aegis
  • 5,573
  • 2
  • 29
  • 41
0

There is third-party library called DateTimePicker contains a beautiful DatePicker, check it out

Datetimepicker

You also can create custom Date Time Picker here custom Date Time Picker

Ihab Shoully
  • 2,251
  • 1
  • 17
  • 22
0

for newer version you can follow this one

https://github.com/wdullaer/MaterialDateTimePicker

Aditya Vyas-Lakhan
  • 12,393
  • 15
  • 55
  • 92