Sketchware

Sketchware

  • Docs
  • Community
  • Blog

›Components

The Basics

  • Getting Started
  • Creating a New Project
  • Designing Your App
  • Programming Your App
  • Adding Components
  • Adding Resources

Firebase

  • Getting Started
  • Linking Android App
  • Project Settings
  • Setting Database Rules
  • Enabling Login Methods
  • Enabling Firebase Storage

AdMob

  • Getting Started
  • Creating Ad Unit
  • Sketchware AdMob Settings

Publishing

  • Getting Started
  • Creating a Service Account
  • First Time Publishing

Components

  • Intent
  • SharedPreference
  • Calendar
  • Vibrator
  • Timer
  • Dialog
  • MediaPlayer
  • SoundPool
  • ObjectAnimator
  • Camera
  • FilePicker
  • Gyroscope
  • Firebase DB
  • Firebase Auth
  • Firebase Storage

Dialog

Dialog is a popup that is often used to confirm user's action.

Example

Create and show a dialog with the title and message with OK and Cancel button.

example



Blocks

setTitle

Set the title of the dialog.

set title

TypeExplanationRequired
DialogDialog ComponentYes
StringTitle of the dialogYes

setMessage

Set the message of the dialog.

set message

TypeExplanationRequired
DialogDialog ComponentYes
StringMessage of the dialogYes

OK Button Clicked

Add an OK button, and determine the action to perform when clicked.

ok button

TypeExplanationRequired
DialogDialog ComponentYes
StringText of the OK ButtonYes

Cancel Button Clicked

Add a Cancel button, and determine the action to perform when clicked.

cancel button

TypeExplanationRequired
DialogDialog ComponentYes
StringText of the Cancel ButtonYes

Neutral Button Clicked

Add a Neutral button, and determine the action to perform when clicked.

neutral button

TypeExplanationRequired
DialogDialog ComponentYes
StringText of the Neutral ButtonYes

Show

Show the created dialog. Note that the dialog will not show without this block.

show

TypeExplanationRequired
DialogDialog ComponentYes
← TimerMediaPlayer →
  • Example
  • Blocks
    • setTitle
    • setMessage
    • OK Button Clicked
    • Cancel Button Clicked
    • Neutral Button Clicked
    • Show
Sketchware
Docs
Getting Started
Community
FacebookSlack
More
BlogMedium
Copyright © 2018 Sketchware