Android Custom CountDownView

Related tags

UI/UX CountDownView
Overview

CountDownView

Android Custom CountDownView

Visit Count

Import

implementation 'com.github.RDSunhy:CountDownView:v1.0.0'

Sample

Xml

">
<top.sunhy.countdownview.CountDownView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>

Code

val startTime = System.currentTimeMillis()
val endTime = startTime + 2 * 24 * 60 * 60 * 1000
countDownView.start(startTime, endTime)

val millisecond = 2 * 24 * 60 * 60 * 1000
countDownView.start(millisecond)

countDownView.config().apply {
    timeTextSize = 12f.sp
    timeTextColor = Color.WHITE
    suffixGravity = CountDownViewConfig.GRAVITY_TOP
    isShowDay = true
    daySuffixText = ""
    isShowTimeBg = true
    //...
}
countDownView.updateConfig()

Customization

attr type default
timeTextSize float 14f.sp
suffixTextSize float 24f.sp
timeTextColor int Color.WHITE
timeBgColor int Color.BLACK
suffixTextColor int Color.BLACK
isTimeTextBold boolean false
isSuffixTextBold boolean false
daySuffixText string
hourSuffixText string
minuteSuffixText string
secondSuffixText string
milliSecondSuffixText string
isShowDay boolean true
isShowDaySuffix boolean true
isShowHour boolean true
isShowHourSuffix boolean falsetrue
isShowMinute boolean true
isShowMinuteSuffix boolean true
isShowSecond boolean true
isShowSecondSuffix boolean true
isShowMilliSecond boolean true
isShowMilliSecondSuffix boolean true
timeBgRadius int 2.dp
timeBgPadding int 2.dp
suffixDayHorizontalMargin int 2.dp
suffixHourHorizontalMargin int 2.dp
suffixMinuteHorizontalMargin int 2.dp
suffixSecondHorizontalMargin int 2.dp
suffixMilliSecondHorizontalMargin int 2.dp
suffixGravity int CountDownViewConfig.GRAVITY_CENTER
You might also like...
An Android custom view to display digits rendered as dots in a grid, with a style like a 1970s LED clock.
An Android custom view to display digits rendered as dots in a grid, with a style like a 1970s LED clock.

#DotMatrixView This is an Android library project providing a custom view that can display things on a grid of dots. When the displayed value changes,

 NumberPickerView - Custom Android View to provide a user friendly way of picking numbers. 🧪
NumberPickerView - Custom Android View to provide a user friendly way of picking numbers. 🧪

🚀 Custom view for Android which provides a modern design and gestures for picking numbers in a user friendly way.

(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.
(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.

BottomBar (Deprecated) I don't have time to maintain this anymore. I basically wrote the whole library in a rush, without tests, while being a serious

a custom view that provides dragged and scaled
a custom view that provides dragged and scaled

DragScaleCircleView A custom imageview that provides the circle window can be dragged and scaled, crop image. How does it look? Why? Sometimes need to

Custom & highly configurable seek slider with sliding intervals, disabled state and every possible setting to tackle!
Custom & highly configurable seek slider with sliding intervals, disabled state and every possible setting to tackle!

LabeledSeekSlider Custom & highly configurable seek slider with sliding intervals, disabled state and every possible setting to tackle! Minimum target

A custom liquidbounce for redesky.com

FDPClient A free mixin-based injection hacked-client for Minecraft using Minecraft Forge based on LiquidBounce. Website: https://fdp.liulihaocai.pw/ L

Sliders for compose with custom styles
Sliders for compose with custom styles

Custom compose sliders This package allows you to build highly customizable sliders and tracks for compose for android Add to your project Add it in y

DailyTags - a flexible markdown library that supports custom tags and markups
DailyTags - a flexible markdown library that supports custom tags and markups

The library parses a given markup into rich text for Jetpack Compose. DailyTags comes with Markdown and HTML support by default (please, see the supported features) and is very easy to extend to support custom markups.

 🗨️ Beautiful Dialog is a Simple and Beautiful custom dialog
🗨️ Beautiful Dialog is a Simple and Beautiful custom dialog

Beautiful Dialog 🗨️ Beautiful Dialog is a Simple and Beautiful custom dialog. Screenshots Including in your project Gradle Add below codes to your ro

Releases(v1.0.0)
Owner
the Sun.
the Sun.
Useful library to use custom fonts in your android app

EasyFonts A simple and useful android library to use custom fonts in android apps without adding fonts into asset/resource folder.Also by using this l

Vijay Vankhede 419 Sep 9, 2022
Custom android music player view.

InteractivePlayerView Custom android music player view. Screen Check it on youtube Usage(XML) Define it in your xml file. <co.mobiwise.library.Intera

Mert Şimşek 744 Dec 25, 2022
Android Library for Custom Switches.

Android Library for Custom Switches.

Angad Singh 376 Jan 4, 2023
Custom wheel widget for android

Wheel widget for Android To include the wheel widget in the current layout, you should add in the layout xml this lines: <it.sephiroth.android

Alessandro Crugnola 384 Nov 21, 2022
IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts.

IconicDroid IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts. Try out the sample application on the Googl

Artur Termenji 387 Nov 20, 2022
Set custom font in Android application

MagicViews Provides a simple way to set custom font in Android application. Adding to your project Add the library as a dependency to your build.gradl

Ivan Kocijan 225 Nov 20, 2022
A beautiful Android custom View that works similar to a range or seekbar. With animations.

ValueBar A beautiful Android custom View that works similar to a range or seekbar. Selection by gesture. With animations. Supporting API level 11+. De

Philipp Jahoda 147 Nov 20, 2022
An android custom view that displays a circle with a colored arc given a mark

MarkView An android custom view that displays a circle with a colored arc given a mark. Usage Add as a dependency compile 'com.github.xiprox.markv

İhsan Işık 200 Nov 25, 2022
Custom UI control for android which is showing data as a segments and a value inside them.

Segmented Bar View for Android Custom UI control for android which is showing data as a segments and a value inside them. Screenshots Install From rep

GSPD 354 Nov 10, 2022
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

D_clock爱吃葱花 316 Nov 29, 2022