Main menu

Pages

[Interested] How to make fab progressbar in sketchware.

 

[Interested] How to make fab progressbar in sketchware.


1. Create new project / enter in your old project.



2. Click on the main.xml at the bottom of the SK virtual screen, like shown the picture 👇



3. Click on that small image and it will take you to another step like shown in the pic below 👇

 

4. Check or mark the box true and then click on save to save the changes.





5. Now 1st Section done, let's go and create a timer component and name it "prog", like shown in the picture below 👇






6. Now second section done, let's go and create moreblock, please follow this pictures below to create the moreblock in simple way.

  • Click on the fab (small red circle round button).

  • Type the name "Fabprogress" on the block name and type "Start" on the veriable name. Make sure you choose boolean as the veriable, like shown in this pictures below 👇


  • Click on the add button beside the "enter veriable name" like shown in the picture below 👇




  • Now Click on the Add on the left side of cancel button, like shown in the picture below 👇


  • Now the moreblock is successfully created let's click on it to take us to inside.

  • Now we are going to insert codes and blocks in the moreblock we have created now like shown in the pictures below👇.
  • Create 2 boolean veriable, first boolean name "click" and second boolean name "prog_boolean"
  • Copy the following codes and insert them to your moreblock :
  1. _fab.setImageResource(R.drawable.load);
  2. _fab.setRotation((float)(_fab.getRotation() + 10));
  3. _fab.setImageResource(R.drawable.pus);
  4. _fab.setRotation((float)(0));
  5. _fab.setImageResource(R.drawable.pus); _fab.hide(); _fab.show();


7. Now Click on the fab on the SK virtual screen (blue color) and navigate to onclick event and add these blocks like shown in this pictures👇



8. Click or Pull out Sketchware Drawer and click on image manager and add these two images with the same names else you will get errors or unless you go and change the image name in the codes in the moreblock name "Fabprogress" that we created earlier.






9. After inserting the pictures, save and run the project and thats means you are done.👌



   
reactions

Comments

1 comment
Post a Comment

Post a Comment