-
Notifications
You must be signed in to change notification settings - Fork 3
CountdownView
DV Infosys edited this page Jul 17, 2019
·
1 revision
CountdownView mCvCountdownViewTest1 = (CountdownView)findViewById(R.id.countdown_view);
mCvCountdownViewTest1.setTag("test1");
long time1 = (long)5 * 60 * 60 * 1000;
mCvCountdownViewTest1.start(time1);
<com.dvinfosys.widgets.CountdownView.CountdownView
android:id="@+id/countdown_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
app:isHideTimeBackground="false"
app:isShowDay="false"
app:isShowHour="false"
app:isShowMillisecond="true"
app:isShowMinute="true"
app:isShowSecond="true"
app:suffixGravity="center"
app:suffixTextColor="#000000"
app:suffixTextSize="30sp"
app:timeBgDivisionLineSize="1dp"
app:timeBgRadius="3dp"
app:timeBgSize="50dp"
app:timeTextColor="#FFFFFF"
app:timeTextSize="30sp" />
attr | type | default |
---|---|---|
isHideTimeBackground | boolean | true |
timeBgColor | color | #444444 |
timeBgSize | dimension | timeSize + 2dp * 4 |
timeBgRadius | dimension | 0 |
isShowTimeBgDivisionLine | boolean | true |
timeBgDivisionLineColor | color | #30FFFFFF |
timeBgDivisionLineSize | dimension | 0.5dp |
timeTextSize | dimension | 12sp |
timeTextColor | color | #000000 |
isTimeTextBold | boolean | false |
isShowDay | boolean | auto show (has value show if not hide) |
isShowHour | boolean | auto show (has value show if not hide) |
isShowMinute | boolean | true |
isShowSecond | boolean | true |
isShowMillisecond | boolean | false |
isConvertDaysToHours | boolean | false |
suffixTextSize | dimension | 12sp |
suffixTextColor | color | #000000 |
isSuffixTextBold | boolean | false |
suffixGravity | 'top' or 'center' or 'bottom' | 'center' |
suffix | string | ':' |
suffixDay | string | null |
suffixHour | string | null |
suffixMinute | string | null |
suffixSecond | string | null |
suffixMillisecond | string | null |
suffixLRMargin | dimension | left 3dp right 3dp |
suffixDayLeftMargin | dimension | 0 |
suffixDayRightMargin | dimension | 0 |
suffixHourLeftMargin | dimension | 0 |
suffixHourRightMargin | dimension | 0 |
suffixMinuteLeftMargin | dimension | 0 |
suffixMinuteRightMargin | dimension | 0 |
suffixSecondLeftMargin | dimension | 0 |
suffixSecondRightMargin | dimension | 0 |
suffixMillisecondLeftMargin | dimension | 0 |
isShowTimeBgBorder | boolean | false |
timeBgBorderColor | color | #000000 |
timeBgBorderSize | dimension | 1dp |
timeBgBorderRadius | dimension | 0 |
Copyright (C) 2019 DV Infosys
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.