-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME
30 lines (18 loc) · 919 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 TimePreference.jar file.
In your activity that descends from PreferenceActivity:
import org.bostonandroid.timepreference.TimePreference;
In your preference XML:
<org.bostonandroid.timepreference.TimePreference
android:key="alert_at" android:title="@string/alert_at"
android:defaultValue="14:01" />
To quickly get the Time selected for "alert_at", in your PreferenceActivity:
TimePreference.getTimeFor(
PreferenceManager.getDefaultSharePreferences(this),
"alert_at");
To set the time use .setTime(String).
To make the JAR:
With just the TimePreference source code loaded in Eclipse:
In the Package Explorer right click on the "default.jardesc" file and select "Create JAR"