-
-
Notifications
You must be signed in to change notification settings - Fork 904
/
AnalogClock.java
58 lines (49 loc) · 1.55 KB
/
AnalogClock.java
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package io.github.project_travel_mate.utilities;
import android.content.Context;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.util.AttributeSet;
import utils.TravelMateAnalogClock;
public class AnalogClock extends TravelMateAnalogClock {
private void init() {
//use this for the default Analog Clock (recommended)
initializeSimple();
//or use this if you want to use your own vector assets (not recommended)
//initializeCustom(faceResourceId, hourResourceId, minuteResourceId, secondResourceId);
}
/**
* @param ctx - copntext
*/
public AnalogClock(Context ctx) {
super(ctx);
init();
}
/**
* @param context - context
* @param attrs - attributes
*/
public AnalogClock(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
/**
* @param context - context
* @param attrs - attributes
* @param defStyleAttr - resource attribute
*/
public AnalogClock(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
/**
* @param context - context
* @param attrs - attributes
* @param defStyleAttr - resource attribute
* @param defStyleRes - style resources
*/
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public AnalogClock(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
init();
}
}