Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CountDown SetTotalTime #10

Closed
LTFENG opened this issue Jan 23, 2019 · 4 comments
Closed

CountDown SetTotalTime #10

LTFENG opened this issue Jan 23, 2019 · 4 comments
Labels

Comments

@LTFENG
Copy link

LTFENG commented Jan 23, 2019

Hi dear Author Xenione,

May I ask is that possible to make it customized that I can called the function like setTotalTime in other fragment ?

I tried to modify the example countdown view, but failed XD because it only limits to 10 hours, and I don't know the best way to modify it.

Hope you can help me.

Thanks Great Work !

@xenione xenione assigned xenione and unassigned xenione Jan 23, 2019
@xenione
Copy link
Owner

xenione commented Jan 23, 2019

Hi LTFENG
You can add many tab-digit as you need.

@xenione xenione closed this as completed Jan 23, 2019
@LTFENG
Copy link
Author

LTFENG commented Jan 24, 2019

Thanks for reply me

I am not sure would you read this reply

yes, I know I can add many of tab-digit
btw, I would like to ask for the countdown view
https://github.com/xenione/tab-digit/blob/master/app/src/main/java/com/xenione/demos/digit/CountdownView.java

is it ok to make it fit to any totalhours ?
so I can make a function like setTotalHour in any fragments or activity.

sorry, if my question is unclear, because the example only fit to 10 hours.

Thanks @xenione

@xenione
Copy link
Owner

xenione commented Jan 24, 2019

Yes , you can do it. Please take a minute to understand how countdown demo works and I pretty sure you will make it yourself.

@LTFENG
Copy link
Author

LTFENG commented Jan 27, 2019

@xenione
Thanks for your reply =)

// example we take 30 mins (30 * 60)
totalTime = 30 * 60

val hourHeight = (time / 36000).toInt()
println("total hour ${time}") // total hour 0
println("hour height ${hourHeight}") // hour height 0
println("result ${9-hourHeight}") // result 9
println("Deximal result - ${DECIMAL[9-hourHeight]}") // Deximal result - 0 ! should this result show in count down ?
mCharHighHour!!.setChar(9-hourHeight)
// MAY I ASK why the result show 9 but not 0 ?

Thank you once again for reply me. Appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants