Skip to content

A DateTimePreference, analogous to DatePreference or TimePreference.

License

Notifications You must be signed in to change notification settings

UncleSunnyWen/DateTimePreference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DateTimePreference

Description

A DateTimePreference, analogous to DatePreference or TimePreference

Screenshots

Usage

  • In Eclipse with your project open:

    1. In the Package Explorer right click on your project and select "Properties".
    2. Select "Java Build Path" -> "Libraries".
    3. "Add External JARs..." then select the DateTimePreference.jar file.
  • In your activity that descends from PreferenceActivity:

      import com.unclesunny.datetimepreference.DateTimePreference;
  • In your preference XML:

      <com.unclesunny.datetimepreference.DateTimePreference
         android:key="start_time"
         android:title="Start Time" />
  • To quickly get the Date and Time selected for "start_time", in your PreferenceActivity:

    DateTimePreference.getDateTimeFor(
    PreferenceManager.getDefaultSharePreferences(this),
    "start_time");
  • To set the date and time use .setDateTime(String).

  • To make the JAR:

    With just the DateTimePreference source code loaded in Eclipse:

    In the Package Explorer right click on the "default.jardesc" file and select "Create JAR"

About

A DateTimePreference, analogous to DatePreference or TimePreference.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages