1+ [ ![ Release] ( https://jitpack.io/v/tsuryo/NumberPicker.svg )] ( https://jitpack.io/#tsuryo/Android-Countdown-Timer )
12# Android-Countdown-Timer
3+ Android library provide a simple to use Countdown Timer View.
24
5+ <img width =" 175 " alt =" Android Countdown timer " src =" https://user-images.githubusercontent.com/42518244/61465838-8b08dd00-a981-11e9-9663-a1f0f21724b4.png " >
36
7+ ### Prerequisites
8+ Android 5.0+ API 21+
9+ # Features
10+
11+ * Customizable fonts (color, size, fonts resources).
12+ * Choose maximum time unit to show.
13+ * Built in fonts to choose,
14+ app: counter_font ="DIGITAL|DIGITAL_BOLD|DIGITAL_ITALIC|DIGITAL_ITALIC_BOLD|REGULAR"
15+
16+ # Usage
17+ // Java
18+ ```
19+ mCounter = findViewById(R.id.counter);
20+ mCounter.setDate("2019-07-19T18:33:00"); //countdown starts
21+ /*
22+ * Additional attributes:
23+ * */
24+ mCounter.setIsShowingTextDesc(true);
25+ mCounter.setTextColor(R.color.colorPrimary);
26+ mCounter.setMaxTimeUnit(TimeUnits.DAY);
27+ mCounter.setTextSize(30);
28+ mCounter.setTypeFace(ResourcesCompat.getFont(this, R.font.batmfa__));
29+ ```
30+ //XML
31+ ```
32+ <com.tsuryo.androidcountdown.Counter
33+ android:id="@+id/counter"
34+ android:layout_width="wrap_content"
35+ android:layout_height="wrap_content"
36+ android:layout_marginBottom="8dp"
37+ app:layout_constraintBottom_toTopOf="@+id/gdH50"
38+ app:layout_constraintLeft_toLeftOf="parent"
39+ app:layout_constraintRight_toRightOf="parent"
40+ app:layout_constraintTop_toTopOf="parent"
41+ app:max_time_unit="HOUR"
42+ app:text_color="@color/colorPrimary"
43+ app:text_size="36dp"
44+ app:custom_font="@font/batmfa__" />
45+
46+ <com.tsuryo.androidcountdown.Counter
47+ android:id="@+id/counte1"
48+ android:layout_width="wrap_content"
49+ android:layout_height="wrap_content"
50+ app:layout_constraintBottom_toBottomOf="parent"
51+ app:layout_constraintLeft_toLeftOf="parent"
52+ app:layout_constraintRight_toRightOf="parent"
53+ app:layout_constraintTop_toBottomOf="@+id/gdH50"
54+ app:max_time_unit="DAY"
55+ app:text_color="#2196F3"
56+ app:text_size="36dp"
57+ app:textual_description="true"
58+ app:counter_font="DIGITAL_BOLD" />
59+
60+ ```
461### Installing
562
663Add the JitPack repository to your build file.
@@ -17,6 +74,6 @@ allprojects {
1774Add the dependency
1875```
1976dependencies {
20- implementation 'com.github.tsuryo:Android-Countdown-Timer:1'
77+ implementation 'com.github.tsuryo:Android-Countdown-Timer:1. 1'
2178}
2279```
0 commit comments