Now that you've had a look at some of the user interface widgets and layouts, the next step is for us to add functionality to the various widgets. You now want an action to happen during a certain *EVENT* such as navigate to another screen. This will be done using components.
Sketchware comes with numerous *COMPONENTS* and you can see some of these in the attached screen. These *COMPONENTS* are used within events. For example, when the User opens the app for the first time( *onCreate* ) you might want to automatically display a welcome message. This is done by creating a *dialogue* component.
Each of these components behaves differently but they are controlled using blocks. This is the programming aspect of building your app. Depending on whatever *LOGIC* you can come up with, I guarantee you can build amazing apps.
Sketchware comes with numerous *COMPONENTS* and you can see some of these in the attached screen. These *COMPONENTS* are used within events. For example, when the User opens the app for the first time( *onCreate* ) you might want to automatically display a welcome message. This is done by creating a *dialogue* component.
Each of these components behaves differently but they are controlled using blocks. This is the programming aspect of building your app. Depending on whatever *LOGIC* you can come up with, I guarantee you can build amazing apps.
In our logic section, let's go to the components section and create a new dialog component.
I gave my component the name "welcome" and placed it on onActivityCreate. This will make it appear when the app is opened. You can place this onButtonClick or wherever you want the dialog box to be displayed. I have placed my blocks in the following way.
Please note that you can leave out the title block if you do not need it. Alternately, you can use the title and leave out the setMessage block. When I am done and I run the app, it will display the dialog box displayed in the image below.
Comments