An alternative DatePicker for Android

Overview
 Copyright (C) 2011 Daniel Berndt - Codeus Ltd - DateSlider 1.1

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.



What is DateSlider ?
====================

It is an android dialog which can be used in a similar way to the default DatePicker or TimePicker
dialog. Its main advantages are a slide based interface and features such as a minimum or maximum
date, or a minute interval for the time picker variant 


How To Install
==============

in the files you can find a sample application (i.e. activity) which
implements the DateSlider. Just copy the relevant files into your project
and you should be ready to go!

The relevant files for the _default_ slider are:

  In the src/.../DateSlider folder:
   - DateSlider.java
   - DefaultDateSlider.java
   - ScrollLayout.java
   - ScrollContainer.java
   - TimeObject.java
   - TimeView.java
  
  In the src/.../DateSlider/labeler folder:
   - DayLabeler.java
   - DayDateLabeler.java
   - Labeler.java
   - MonthLabeler.java
   - MonthYearLabeler.java
   - Util.java
  
  In the src/.../DateSlider/labeler folder:
   - *.java (all files) 
   

  In the res/ folder:
   - drawable/*.xml
   - layout/defaultdateslider.xml
   - layout/dialogbuttons.xml
   - layout/dialogtitle.xml
   - values/*.xml

If you want to use any other dateslider implementation just follow the dependencies. (I hope the
names of the files should give some clues about whether or not they are needed for a certain
implementation)

Changes
=========

1.1
---------
the core algorithm was rewritten from scratch to make it faster, smoother, less memory expensive and
easier to adapt

1.1.2
- - - - -
added a setTime() method to update the time after the dialog has been first invoked
fixed a bug which occurred when dealing with time zones other than the default time zone 

1.2
---------
A massive thanks to [Ben Demboski] who spend a lot of invaluable work in refactoring this project. 
He made some big changes in the code base to make it very easy to expand and modify the dateslider's 
look and behaviour.

now the dateslider supports time ranges which can be open

it's straight forward to incorporate a minute interval such that only multiples of this interval
are displayed.

the designed was refined. It is now based on an xml file and shadows at the border were included 


Feedback
========

Further feedback is highly appreciated and can be sent to < [email protected] > . 
And please let me know whether the DateSlider makes it into your application!
Comments
  • TimeLabeler's MINUTEINTERVAL should be configurable

    TimeLabeler's MINUTEINTERVAL should be configurable

    We should figure out a way to make the MINUTEINTERVAL configurable for code, or better yet, from XML. However, since in XML labelers are only specified by their class names, this might have to be a generic property that could be set for any type of labeler.

    opened by bendemboski 2
  • Changing the Width of TimeLayoutView

    Changing the Width of TimeLayoutView

    Looking to increase the size of the TimeLayoutView to give more space between the days. I tried adding the following lines of code, but they aren't working:

    //This did nothing topView.setMinWidth(200);

    //This made the text disappear topView.setLayoutParams(new LayoutParams(200,LayoutParams.WRAP_CONTENT,1.0f)); image

    opened by industrychanger 1
  • Selected Text and Background Colors

    Selected Text and Background Colors

    I'm still trying to figure out how this project works. I need to change the text colors within the ScrollLayout. Currently, the unselected text is a grey and the selected color is black.

    Where are these color values stored? How can they be change? image

    opened by industrychanger 1
  • OnDateSetListener does not pass Calendar corrected for minute interval

    OnDateSetListener does not pass Calendar corrected for minute interval

    When implementing an OnDateSetListener for a DateSlider, the Calendar object that is passed to the listener's onDateSet method is not adjusted to the configured MINUTEINTERVAL. Instead, the normal date is returned, so you end up getting dates in between the interval, such as 5:10 when the MINUTEINTERVAL is set to 15.

    Expected behavior is the Calendar returned matches the date chosen by the user, without having to do a

    selectedDate.set(Calendar.MINUTE, selectedDate.get(Calendar.MINUTE)/TimeLabeler.MINUTEINTERVAL*TimeLabeler.MINUTEINTERVAL);
    

    to correct it.

    opened by nickdaugherty 1
  • Parent view group might intercept touch events (e.g., ViewPager) when SliderContainer is used as-is (i.e., not within dialog)

    Parent view group might intercept touch events (e.g., ViewPager) when SliderContainer is used as-is (i.e., not within dialog)

    I am using the SliderContainer within a Fragment whic itself is transitively contained in a ViewPager/TabHost. The ViewPager intercepts touch events and causes the tabs to change instead of making the sliders scroll.

    opened by csoltenborn 1
  • DateSlider should accept a range of allowed times

    DateSlider should accept a range of allowed times

    The application should be able to optionally specify a start and/or end time that defines a (possibly half-open) range of allowable times. If the user tries to scroll back past the range start or forward past the range end, the scroller should just not scroll. This would be very useful for cases where the application needs the user to choose a time in the future, or in the past, and probably for other cases as well.

    opened by bendemboski 1
  • README needs to be updated

    README needs to be updated

    The README hasn't been updated for the changes in https://github.com/bendemboski/DateSlider/commit/93310dfc20482b44784bc35f7e623c3b7c8a8bf5, and some of it is out-of-date.

    opened by bendemboski 1
  • Force Close App After Proguard

    Force Close App After Proguard

    It's ok when debug mode and export apk file without proguard. But after proguard, my app fore close when touch DateSlider. (I'm copy source code to my package)

    opened by newstarbka 0
  • Select with

    Select with "onClick" event too

    Some users try to select dates clicking in the date (instead scroll to it).

    Is there any way to select (scroll to) the child view clicked by the user?

    Thanks in advance

    opened by francho 0
  • DateSlider as Android library

    DateSlider as Android library

    Hi, starting ADT17 it is possible to use custom attributes in the layout in android libraries. Your great DateSlider ist much easier to play with and to use. So I little bit reorganized you sources, splitted into into library and demo part. And I added support for maven.

    Great work.

    Best regards, Michal Harakal

    opened by michalharakal 0
Fully customizable Calendar/DatePicker for Android/Kotlin

AMCalendar - Android Date (Range) Picker AMCalendar is a fully customisable widget for picking dates and ranges based on the native Calendar. It's an

null 6 Oct 18, 2022
Time-DatePicker - A Simple Time Date Picker With Kotlin

Time-DatePicker Time.DatePicker.mp4

Faysal Hossain 0 Jan 19, 2022
Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.

Android Week View Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling. Fea

Raquib-ul Alam (Kanak) 3.4k Jan 3, 2023
A Material design back port of Android's CalendarView

Material Calendar View A Material design back port of Android's CalendarView. The goal is to have a Material look and feel, rather than 100% parity wi

Prolific Interactive 5.8k Jan 5, 2023
Standalone Android widget for picking a single date from a calendar view.

TimesSquare for Android Standalone Android widget for picking a single date from a calendar view. Usage Include CalendarPickerView in your layout XML.

Square 4.4k Dec 20, 2022
Pick a date or time on Android in style

Material DateTime Picker - Select a time/date in style Material DateTime Picker tries to offer you the date and time pickers as shown in the Material

null 4.7k Jan 4, 2023
[NO LONGER MAINTAINED] Android library for better Picker DialogFragments

/!\ This Project is no longer maintained /!\ DialogFragments modeled after the AOSP Clock and Calendar apps to improve UX for picking time, date, numb

Code-Troopers 2.7k Dec 29, 2022
A better calendar for Android

Caldroid Caldroid is a fragment that display calendar with dates in a month. Caldroid can be used as embedded fragment, or as dialog fragment. User ca

Roomorama 1.4k Jan 5, 2023
An android library which provides a compact calendar view much like the one used in google calenders.

CompactCalendarView CompactCalendarView is a simple calendar view which provides scrolling between months. It's based on Java's Date and Calendar clas

SundeepK 1.5k Dec 9, 2022
Wheel-like spinner widget for Android

Update Dec 2016 Library is discontinued There's still a lot of wheel libraries out there. Update Oct 2014 I am thinking of rewriting this control. Upd

Dimitri Fedorov 641 Jan 2, 2023
Android calendar view (like card)

android-calendar-card (Google Play Demo) Android calendar view (like card) Simple and easy to modify Author: Michał Szwarc #CalendarCardPager License

Michał Szwarc 473 Nov 10, 2022
An calender widget for your Android home screen.

Todo Agenda - Calendar and Task widgets for Android Todo Agenda is home screen widgets for your Android device. Each widget has its own settings and d

null 368 Dec 21, 2022
Android time range picker

TimeRangePicker TimeRangePicker is a library which can be used to select a time range. WARNING Requires android-support-v4 Description This library pr

Titto Jose 422 Nov 10, 2022
Android calendar view inspired by Sunrise calendar and iOS7 stock calendar

SilkCal Android calendar view inspired by Sunrise calendar and iOS7 stock calendar. Usage Add compile 'me.nlmartian.silkcal:library:0.1.1' to your dep

JunGuan Zhu 385 Nov 25, 2022
an android open source timer

TimerView ENGLISH README 重要的事情 由于使用了MaskFilter,辉光效果必须[关闭硬件加速](http://blog.chenming.info/blog/2012/09/18/android-hardware-accel/)!! 由于使用了MakskFilter,辉光

iamnull 277 Nov 28, 2022
FlipTimerView library for Android

FlipTimerView Preview FlipTimerView library for Android Getting started Add it in your root build.gradle at the end of repositories: allprojects { re

Anu S Pillai 314 Dec 28, 2022
Easy-to-use animated clock icon for Android

Timecon Easy-to-use animated clock icon written in Kotlin Including in your project Add to your root build.gradle: allprojects { repositories {

Alexey Derbyshev 262 Dec 9, 2022
[NO LONGER MAINTAINED] Android library for better Picker DialogFragments

/!\ This Project is no longer maintained /!\ DialogFragments modeled after the AOSP Clock and Calendar apps to improve UX for picking time, date, numb

Code-Troopers 2.7k Dec 29, 2022
an android open source timer

TimerView ENGLISH README 重要的事情 由于使用了MaskFilter,辉光效果必须[关闭硬件加速](http://blog.chenming.info/blog/2012/09/18/android-hardware-accel/)!! 由于使用了MakskFilter,辉光

iamnull 277 Nov 28, 2022