How to Create a Digital Clock App in Sketchware

 


In this post we are learning how to create a Digital Clock App Using Sketchware.


To create a Simple Digital Clock App in sketchware, or to display time in your android app, follow the instructions given below:


☑️ Create a New Project



☑️ In VIEW area add a Linear(V) linear1. 


☑️For linear1 set gravity to center_vertical and set the width to match parent



☑️ Inside linear1, add a Linear(H) linear2.



☑️ In LOGIC area, open onCreate event. Insert an add source directly block from operator section. In this add source directly block put codes provided below:

TextClock clock = new TextClock(this);

clock.setTextSize(50);

clock.setTextColor(Color.RED);

clock.setFormat24Hour("dd MMM yyyy hh:mm:ss cccc");

linear2.addView(clock);



This code creates a new TextClock clock. Then sets the text size and text color for the TextClock, sets the format for the TextClock, and adds the TextClock to linear2.


For symbols which can be used in clock format visit  


☑️ Save and run the project. Install the app generated. The app will display the current date, current time, and day as shown in the image below.



Please, share and bookmark this page if you don’t want to miss an Update, you can as well join our Official WhatsApp Group (for latest cheats and updates) - Click HERE to Join the Group




Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.