Skip to main content

How to make a stopwatch application in Kodular?

 

How to make a stopwatch application in Kodular?

How to make a stopwatch application in Kodular?

So, guys we are back with a new tutorial. In today's tutorial we will learn making an app rather than learning to use any component in  Kodular creator. It has been time, since we  have provided a tutorial for making a android app in Kodular Creator Series. Hence, today we will  be learning How to make a simple seconds based stopwatch in Kodular. Here firstly we talk about some of FAQ's about Stopwatch in Kodular creator.......

FAQ's about stopwatch App

1. Functions of this Stopwatch

If you want to know the main functions of this Stopwatch application then we have how this app will work:
1. Firstly User has to start the stopwatch
2. Then he can pause or start the stopwatch.
3. User will be able to reset this stopwatch.
4. User can check timing upto 10 mini seconds.
5. User can easily use this app.

2. How will this app work?

In this app we will use a timer component to record time and we will use button for start stop and reset the stopwatch. We will design UI very simple and easy understanding with user friendly. In this app we will record the time of a clock component using a label every time it complete the time interval. So, let's directly get through it without waiting any more....

Designing

For designing of this application you need to follow these steps after configuring and opening your project:

Step 1: Add a clock component from sensors option and  set it's time interval 100 microseconds. Then set the time always fires true and set the timer enabled unchecked. Hence, the stopwatch won't start until we click on the Start button.

Step 2: Add a image and label denoting your stopwatch to make it look attractive. You can get the stopwatch image from here.

Step 2: Add a horizontal arrangement layout from layout and set it's height 70 pixels. Then set align horizontal and align vertical to center. So that, we will get anything we place in it at center of it.

Step 3: Add two labels to it one should show the seconds and the other mini seconds and add a ' : ' between them to recognize between them easy for user.

Step 4: Add three buttons, one for Start other for pause and third for reset the stopwatch. Place them vertically and make them of big size (depends upon your opinion) and give them some good attractive  color.

Step 5: Now set all the visible components positions properly using live companion. Kodular viewer doesn't show the actual look of our application. So,take a look of application using companion.

 Here I have a example how you can design UI for your application. You can easily design this UI in Kodular Creator.....

Kodular Stopwatch Design


Blocks For stopwatch:

Block 1: Firstly, you have to set the variable block which will have the values of seconds and mini seconds. Illustration:
Kodular Block no. 1

Block 2: This block will control the event when start button is clicked and set the timer enabled. 

Kodular Block No. 2
Block 3: When clock timer completes then we have to set the value of seconds and mini seconds as the variables which will be shown as Time using labels.
Kodular block no. 3

Block 4: To handle the situation when Stopwatch stop button is clicked by user. We have to set the block such as follows.
Kodular block no. 4

Block 5: To reset the stopwatch timer, we can set the following blocks.
Kodular block no.5

So, now you have done everything that would make your app to working. You can add extra thing in UI or any other codes for you. This will show your creativity. So, you can now easily learn how to use codes of clock component for various function. I hope you got it. This was all for today's tutorial, we will be back again with a new tutorial. Keep connected and....
 
Happy Koding.....

Comments

Popular posts from this blog

How to use Firebase database in Kodular?

Welcome to Learn Web my friends. Today we are going to learn about how to retrieve and store data from user in firebase database. This will be surely very exciting and useful for you guys. So, here we start our tutorial on "How to store data of user in Firebase in Kodular?" How to store data of user in Firebase in Kodular? 1. What is Firebase? I think you guys may have listened about Firebase but if not, then don't worry this isn't any rocket science you will easily learn "How to store and retrieve data of user in Firebase?". Firstly I want to tell you about What is Firebase Database? So, firebase is a cloud storage platform provided by google to store and retrieve data and Firebase also provide many other services that we will learn in our next tutorials. Today we are going to talk about "How to use Firebase Database in Kodular?"  2. What is Firebase database in Kodular? Now I would like to tell you what is Firebase database and what we are going ...

How to use Kodular Companion to test App?

 What is Kodular Companion? I understand, if you are new to kodular then you won't be able to understand what is meant by Kodular companion.So, today we are going to clear your doubt "What is Kodular Companion?".Kodular companion is a android app by Kodular Organisation.This app allow us to test the Realtime changes in our app while creating apps.If we don't use companion then we have to create and download our app to check whether is it working properly or not.But this is not a comfortable method because we can't check realtime changes in our app.So, to check app by downloading and installing we have have to download our app more than 100 times which is not easy for us. Therefore, we are provided a app which we can use to check the realtime changes in our app without downloading it every time. Benefits of Kodular Companion: 1.No need to download app multiple times. 2.Can be used to see realtime changes. 3.We can check different apps with Companion. 4.Useful while...

How to use Blocks in Text section in Kodular Creator?

How to use Blocks in Text section in Kodular Creator?  Guys welcome back to Learn Web Online, Today as you have seen we will be learning about using the main text related blocks. These text blocks are very useful while making your android application. We can edit, trim, join etc. text using the blocks which we will be talking about. The blocks which we will be learning to use today can be found under the built in components 'Text'. So, open your project to get live results to try these blocks your own. Here we start our tutorial without wasting time any more.... Blocks In text section Here, we have the main blocks which we are going to learn to use today's tutorial 1. Text Block: This block is used to denote a text string. This is the basic block which provide a text string in block section. We can use this block to give a text string to any other block. For example we can enter a text and set this text to a specific Label's text. 2. Join Text This block is used to join...