Skip to content

A stylable version of the date/time picker for Android 4.0+ with embedding support (using as normal fragment)

License

Notifications You must be signed in to change notification settings

yor/StyleableDateTimePicker

 
 

Repository files navigation

StylableDateTimePicker

A styleable version of the date/time picker for Android 4.0+ with embedding support (using as normal fragment)

Styled DatePicker

Declare your style:

<style name="DateTimePicker">
    <item name="headerBackgroundColor">...</item>
    <item name="hightlightedTextColor">...</item>
    <item name="buttonBackground">...</item>
    <item name="buttonTextColor">...</item>
    <item name="circleHighlightColor">...</item>
    <item name="defaultTextColor">...</item>
    <item name="selectedDayTextSize">...</item>
    <item name="selectedMonthTextSize">...</item>
    <item name="selectedYearTextSize">...</item>
</style>

Create the DatePicker/TimePicker with

DatePickerDialog dialog = DatePickerDialog.newInstance(callBack, year, monthOfYear, dayOfMonth, R.style.DateTimePicker);

You can also add the pickers as content in your view hierarchy:

DatePickerDialog picker = DatePickerDialog.newInstance(...);
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.add(R.id.picker_wrapper, picker);
ft.commit();

About

A stylable version of the date/time picker for Android 4.0+ with embedding support (using as normal fragment)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published