Doodle App in MIT App Inventor

Hello friends and welcome to Obsidian Soft.

In this tutorial, I will teach you how to make a basic doodle app with sharing feature. You can share your doodles with friends and family using WhatsApp, email, or even post them on Facebook or Instagram.

Start a new project and call it ShareDoodleApp.

Go to media and upload square-size images that will serve as background for eraser, pencil, new doodle, and share doodle buttons.

I am using these images:

https://www.flaticon.com/free-icons/eraser https://www.flaticon.com/free-icons/share https://www.flaticon.com/free-icons/pencil https://www.flaticon.com/free-icons/blank-page

After uploading media, go to screen1 properties and make the screen orientation portrait. Drag and drop a Canvas from Drawing and Animation. For the canvas1 properties, make the background color yellow,  height 80%, width fill parent, line width: 4.0, and paint color black.

Drag and drop a Horizontal Arrangement from the Layout and put it below the canvas. Make height 15% and width fill parent. Make align horizontal and align vertical center and make background-color: white.

Drag and drop a Button from User Interface inside the horizontal arrangement. Rename to eraserBtn and make height and width 50 pixels. Choose the uploaded eraser image as the Image property and make the text property empty.

Duplicate eraserBtn by selecting it and pressing Ctrl + C and Ctrl + V for Windows OR Command + C and Command + V for MacOS.

Rename to pencilBtn and change the image property to pencil image.

Duplicate pencilBtn and rename to clearBtn and change image property to new doodle image.

Duplicate clearBtn and rename to shareBtn and change image property to share doodle image.

From the Social palette, drag and drop a Sharing component.

Screen Design is done so let’s go to the blocks section. 

When someone drags his/her finger on the screen, canvas’s Dragged event is triggered so drag and drop that from canvas1 and use canvas’s drawLine procedure to draw a line from the previous position to the current position.



When someone just touches the canvas, we only want to draw a circle there so get canvas’s
Touched event and call canvas.DrawCircle at x and y with radius 2.

When eraserBtn is clicked, we are just going to change the canvas’s paint color to canvas’s background color however this doesn’t work for iPhones so to make sure that it works even for iPhones, use the actual color block for the color that you have chosen for canvas’s background.

When the pencilbtn is clicked, change the paint color to black.

When the clearBtn is clicked, just clear the canvas so that a new doodle can be done but also reset the paint color back to black.


When the shareBtn is clicked, just share the file returned by canvas’s Save procedure.

This simple doodle app with sharing feature is done. You can refine it further by adding color buttons or even a color palette by following my previous tutorials on making drawing apps.

🎨 Paint App with Color Buttons: https://youtu.be/prmTeD0cacw Paint App with Color picker/ color palette feature: https://youtu.be/6lFi7jCDBek


You can have a look at the video tutorial for Doodle App here:

Please like my videos and share them with your friends and family. Also, subscribe to my channel and press the bell icon so you don't miss any of the great projects I have planned for you.


Please like my Facebook page and Instagram page for more educational resources and tips.

Pinterest:
https://www.pinterest.co.uk/obsidiansoft/_created/
For links to free educational apps, have a look at the educational apps page

Comments

Popular posts from this blog

Jolly Phonics Group 1

Jolly Phonics Group 2

Jolly Phonics Flash Cards