Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implement Horizontal Date Picker in Android

I have a requirement to implement a horizontal date picker as shown in below image:

plz click here to see image

I have tried lots of libraries and googled it about for three days.

I customized this library but not able to style the selected item. i.e. Different color and size.

Please let me know, If is there any suggestion or sample code which can help me to implement the similar requirement.

like image 394
Ahmad Vatani Avatar asked Oct 19 '15 12:10

Ahmad Vatani


People also ask

How to use date and time picker in Android?

How to use date time picker in Android? How to use date time picker in Android? This example demonstrates how do I use date and time picker in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml.

What is datepicker dialog?

DatePicker Tutorial With Example In Android Studio In Android, DatePicker is a widget used to select a date. It allows to select date by day, month and year in your custom UI (user interface). If we need to show this view as a dialog then we have to use a DatePickerDialog class.

How to select date by day month and year in Android?

It allows to select date by day, month and year in your custom UI (user interface). If we need to show this view as a dialog then we have to use a DatePickerDialog class. For selecting time Android also provides timepicker to select time. Let’s discuss some common methods of a datepicker which are used to configure a DatePicker in our application.

How to use the datepicker in AVD?

Now run the App in AVD and you will see datepicker will appear on the screen. Choose the date, month & year and click submit. The date you selected will appear on Screen.


1 Answers

HorizontalPicker is a custom-build Android View used for choosing dates (similar to the native date picker) but draws horizontally into a vertically narrow container. It allows easy day picking using the horizontal pan gesture.

resource :

  • https://github.com/jhonnyx2012/HorizontalPicker

  • https://github.com/GastricSpark/ScrollDatePicker

like image 199
Ali Avatar answered Oct 14 '22 13:10

Ali