CountDown Timer in Sketchware | New Library for sketchware | New blocks | Sketchware example

 Countdown timer is  a most important widget while making Apps with timer system such as clock app, Quiz app, Sales app and many more. 


 But sketchware does not provide pre built widget with this feature. Yes you can make a countdown timer with sketchware but that will take most of your time to fix error and it will also make your application large. 

So what is the solution? 
So to overcome all these problems we just need to do all things told in this post and you will make a countdown timer with an ease.


View area 
In view editor i added one linear and three buttons. 



As you can see one is for start second for pause and third for resume. 

In the top the linear is coverted into a widget



 and you'll get codes for covert and inject in our app swb store avaliable on playstore.


Logic area 
In logic editor, open onCreate and add blocks as shown in pictures. 
You'll get blocks in our app "Sketchware Pro Blocks " from playstore.
Import these blocks in sketchware and then add them in onCreate.




In these blocks i set view to That linear which we converted in view area.
And set the number of days & hours to 0 and mintues and seconds are set to 1 to show time as 0 days : 0 hrs : 1 min : 1 sec



Under the start button i added  view to start timer







Under pause i added for pause and in resume button i added resume block.



Custom Imports

In custom imports i added Three imports you'll find them in " SWB Store" app.





Local Library
You can download local library for this project in "SWB Store" App 
Download and copy that file to .sketchware/libs/local_libs/ folder


After all these things try run your project and done you'll get a countdown timer view in your project.

Comments

Popular posts from this blog

How to import local library in sketchware

Android 10/11 Storage Permission sketchware | New blocks + method

All Sketchware Pro Errors Solution

How to show one time message/dialog in sketchware

what is sketchware and history of sketchware

how to import export custom blocks sketchware

Create HTML Dialog in Sketchware

Import java files in sketchware | How to add java files in sketchware | Basics of sketchware

Sketchware Generate Firebase Dynamic Link (Long Url To Short) | sketchware blocks explained

How To make cool progressbar in sketchware | new block sketchware pro | sketchware pro tutorial