The Creative Art of Programming © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Slides:



Advertisements
Similar presentations
Understanding an Apps Architecture ASFA Computer Science: Principles Fall 2013.
Advertisements

Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
CE881: Mobile and Social Application Programming Simon M. Lucas Layouts.
Android architecture overview 1 CS 150. Android  A software stack for mobile devices developed and managed by Open Handset Alliance  Free software under.
App Inventor Useful links:
Chapter 2. Paint Pot We will build the Paint Pot app in class. Notes regarding the screen/user interface: 1.7 buttons and a canvas 2.The canvas has a picture.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 21 - “Cat and Mouse” Painter Application.
App Inventor Barb Ericson July 3, 2013.
Creating Mobile Apps with App Inventor! Day 4 Google search Kris Gordon Ludlow for links.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Painter Application Introducing Graphics with Windows Presentation Foundation.
Google AppInventor implementation quickstart Chris Greenhalgh G54UBI / Chris Greenhalgh
Practical Computing by Lynn Hogan
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Sketchify Tutorial Graphics and Animation in Sketchify sketchify.sf.net Željko Obrenović
Eyad Alshareef 1 Creating Custom Forms Part A. 2Eyad Alshareef Data Block and Custom Forms Data block form Data block form Based on data blocks that are.
Ch 14. Understanding an App’s Architecture Two perspectives 1.Programmer: a)Components & Behaviour b)Designed in Component designer Blocks editor 2.End-user:
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Shorter of two objects and changing color Functions, events and setting the color Susan Rodger, Duke University June 2008.
Animated Charting Using the Alice Bar Chart Template World By Elizabeth Liang under the direction of Professor Susan Rodger Duke University December 2010.
The Creative Art of Programming © Copyright 2014 Barbara Ann Walters. All Rights Reserved.
Creating Mobile Apps with App Inventor! Day 5 Google search Kris Gordon Ludlow for links.
Quadratic Equation Solver Tutorial. Introduction We will be making an app to solve 2 nd level polynomials like ax 2 +bx+c. We will model our app upon.
XP Tutorial 7 New Perspectives on Microsoft Windows XP 1 Microsoft Windows XP Working with Graphics Tutorial 7.
Win8 on Intel Programming Course Modern UI : Features Cédric Andreolli Intel Software.
CS 104 October 26, 2011 App Inventor. Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Turning Glowing Text into Animated Glowing Text Using Animation Shop.
To download PhotoStory: Go to On the left side under Product Resources, click on Downloads.
1-1 OBJ Copyright 2003, Paradigm Publishing Inc. Dr. Joseph Otto Silvia Castaneda Christopher deCastro CSULA Macromedia Flash MX Introduction.
Adding Content to the Agency Web Site - Part 2. Adding individual web pages for success stories Agency Web Site Adding Content 2, Slide 2Copyright © 2004,
Chapter 14. Copyright 2003, Paradigm Publishing Inc. CHAPTER 14 BACKNEXTEND 14-2 LINKS TO OBJECTIVES Add Borders with Borders Button Add Borders with.
Doodlz App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
App Inventor MIT App Inventor.
Computer Science 112 Fundamentals of Programming II Graphics Programming.
Computer Science 111 Fundamentals of Programming I Model/View/Controller and Data model design.
MIT AI DEMO Start New Program Name “My First Program”
ACTIVINSPIRE TRAINING Tips and tools for creating Flipcharts on ActivInspire.
Quiz Me Tutorial. Introduction QuizMe is a trivia game (the example uses baseball) you can use as a template to build quizzes on any topic. The user steps.
IOS with Swift Hello world app.
Macromedia Studio 8 Step-by-Step MACROMEDIA FIREWORKS 8 Project 2: Experience Bank Logo.
Laboratory Exercise # 9 – Inserting Graphics to Documents Office Productivity Tools 1 Laboratory Exercise # 9 Inserting Graphics to Documents Objectives:
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Designer Basics.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 21 - “Cat and Mouse” Painter Application.
Splatter! ALPHA Presentation By: David Kikuta March 29, 2011.
How to make a Tessellation By: Tyler Gaucher. First you open up paint and make a box, To make a box you click on the blue box on the left side. Then draw.
Photo Story. How to use Photo Story Photo Story 3 can be located in the Accessories folder on school computers. You will need to have your pictures already.
®® Microsoft Windows 7 Windows Tutorial 7 Managing Multimedia Files.
Lesson 1 – Getting Started with App Inventor
CompSci 4 Java 4 Apr 14, 2009 Prof. Susan Rodger.
The Doodlz app enables you to paint by dragging one or more fingers across the screen. The app provides options for setting the drawing color.
Whittier STEM Fair 2016 CARLI PECORARO’S ANDROID APP PROJECT.
Input, Variables, and Calculations. The TextBox Component Performing Calculations Storing Data with Variables Creating Blocks with Typeblocking The Slider.
Introduction to App Inventor 2 ASFA AP CS Principles
MS Paint A simple drawing tool that can be used to create simple or elaborate drawings. These drawings can be either black-and-white or color, and can.
What is a Function Expression?
PhotoShop Creative Suite 3
Visual Programming week # 02 APP (Application) Architecture.
week # 03 Visual Programming Variables Canvas Screen Arrangement
Visual studio 2010 SENG 403, Tutorial 2 SENG Winter 2011.
AppLab Studio.code.org.
Chapter 16 – Programming your App’s Memory
First text statement positioned here at guide intersection
Understanding an App’s Architecture
DIRECTIONS: 1. Click Enable Editing in the yellow bar above.
Topic one text label Topic two text label Topic three text label
Animated picture collection: left picture moves to front center
Creating Animated Apps: Canvas與ImageSprite 靜宜大學資管系 楊子青
Photostory 3.
Presentation transcript:

The Creative Art of Programming © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Canvas View Open the Layout drawer and drag a VerticalArrangement component to the screen Rename it VerticalCanvas Set Height and Width to Fill parent Open the Drawing and Animation Drawer and drag a Canvas to the VerticalCanvas Rename it DrawingCanvas © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Canvas View Open the User Interface Drawer and drag a Button underneath the canvas, but inside VerticalCanvas – In the component tree (or hierarchy) DrawingCanvas and the button should be indented under VerticalCanvas Rename the button CanvasToControlsButton Set Height and Width of DrawingCanvas to Fill parent For CanvasToControlsButton, set Height to automatic and Width to Fill parent Set its Text property to “Controls” This view is finished, so set VerticalCanvas’s visible property to hidden © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Controls View Open the Layout Drawer and drag a VerticalArrangement to the screen and rename it VerticalControls Set the height and width to Fill parent Drag a HorizontalArrangement to VerticalControls and name it Row1 Set Width to Fill parent © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Row1 Drag two buttons to Row1 Name the first SaveButton and the second LoadButton For each of them, set width to Fill Parent and Height to Automatic Set SaveButton’s Text property to “Save Image” Set LoadButton’s Text property to “Load Image” © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Row2 Drag a HorizontalArrangement and place it under Row1 Set Width to Fill parent Drag 2 buttons to Row2 Name the first ClearButton and the second ShareButton For each of them, set width to Fill Parent and Height to Automatic Set ClearButton’s Text property to “Clear Image” Set ShareButton’s Text property to “Save Image” © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Row3 Drag a HorizontalArrangement and place it under Row2 For Row3, set Width to Fill parent Drag 3 buttons to Row3 After they are all dropped inside Row3, for each of them, set width to Fill Parent and Height to Automatic © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Row3 Buttons Name the buttons black, blue, red For each of them, set the background color to match their names Erase the text in the Text property The buttons will look squished, but they will look fine on your device Set Row3’s Height to Fill parent © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Row4 Drag a HorizontalArrangement and place it under Row3 Set width to Fill Parent and Height to Automatic This row will be filled in for the Silver level © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Row5 Add another HorizontalArrangement under Row4 and name it Row5 Set Width to Fill parent From the User Interface drawer, drag a Label to Row5 and name it SelectedColor Set its Width to Fill parent and its height to Automatic Set its Text property to “Selected Color” Set Row5’s Height to Automatic © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Row5 Drag another label to Row5 and name it PreviewColor Set its Width to Fill Parent and Height to Automatic Set its background to black and erase the text in the Text property Drag a Checkbox to Row5 and name it Dot Set its Text property to “Dot” Set its Width to Fill parent and Height to Automatic © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Row6 This is the LAST Row! Drag another HorizontalArrangement under Row5 and name it Row6 Set its Width to Fill Parent Drag a Label to Row6 and name it ThicknessLabel Set its Text property to “Line Thickness” Set its Height and Width to Automatic Drag a Slider (UI drawer) to Row6 and name it Thickness © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Row6 Set Thickness’s Width to Fill parent Set MaxValue to 50 Set MinValue to 1 Set ThumbPosition to 25 Set Row6’s Height to Fill Parent © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

PreviewLine Button Drag a button under Row6 and name it PreviewLineButton Set its Text property to “Preview Line” Set Height and Width to Automatic Drag a Canvas under PreviewLineButton and name it ExampleCanvas Set its Width to Fill Parent and Height to 100 Pixels © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Last UI Component! Drag a button under ExampleCanvas and name it ControlsToCanvasButton Set its Width to Fill parent and Height to Automatic Set its Text property to “Canvas” Go back and set VerticalControls’s visible property to hidden Set VerticalCanvas’s visible property to showing © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Other Components From the Sensors drawer, add an AccelerometerSensor From the Storage drawer, add a TinyDB component and name it MyValues From the Social Media drawer, add a Sharing component © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Components Are Complete! We know that was a lot! Next we’ll program the blocks. This won’t be nearly as complicated as the user interface © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

DrawingCanvas Blocks © Copyright 2014 Barbara Ann Walters. All Rights Reserved. First we’ll set up the canvas like our previous app Here are the blocks to draw lines on the canvas

Accelerometer Blocks Next catch the Shaking event and clear the canvas © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Switching to the Controls View © Copyright 2014 Barbara Ann Walters. All Rights Reserved. When the CanvasToControls button is clicked, set VerticalCanvas’s visible property to false (means hidden) and VerticalControls to true The false and true blocks are in the Logic Built-in

Switching Back to the Canvas © Copyright 2014 Barbara Ann Walters. All Rights Reserved. When the ControlsToCanvas button is clicked, set VerticalControls visible property to false and VerticalCanvas to true The false and true blocks are in the Logic Built-in

Changing Line Thickness When the position is changed on the Slider, it generates the PositionChanged event You can use the value on the ThumbPosition to set the LineWidth on the two canvases © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Changing Paint Color When a color button is clicked, the PaintColor is changed on both canvases Also, the background color on the PreviewColor label has to change Color blocks are found in the Colors Built-in © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Changing Paint Color The previous set of blocks for the black button have to be repeated for each color (black, blue, red), but you can copy these blocks and then just select the correct button name. You will need to replace the color blocks too © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Variable Filename Go to the Variables Built-in and create a new variable named filename Go to the Text Built-in and get a textfield block Leave it empty It will get filled in when the DrawingCanvas is saved © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Saving the Canvas DrawingCanvas’s SaveAs method is called when SaveButton is clicked Notice the canvas’s SaveAs block It has a connector on the left side That’s because it returns a value which is the full path to the image file it created We pass in just the name of the file, but get a full path as a return value We will save that value in the variable “filename” we just created Don’t create this set of blocks, it’s just an example © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

SaveButton Here are the blocks to run when SaveButton is clicked SaveAs saves what is drawn on the canvas as an image file We want the name to be “mypicture.jpeg” The setter and getter for filename is in the Variables Built-in The text block for mypicture.jpeg is from the Text Built-in © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

MyValues TinyDB MyValues StoreValue method will save an application Property and its value Our property is named picture The value is the filename returned from SaveAs The getter and setter for filename is found in the Variables Built-in © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

LoadButton LoadButton retrieves the “picture” value from MyValues (TinyDB) and sets filename with that value The getter and setter for filename is in the Variables Built-in We’ll also set the Background image on DrawingCanvas to the image we saved on the device © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

ClearButton If the background image was set on the DrawingCanvas, we clear it by setting the background image to “None” The text block is found in the Text Built-in © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

ShareButton This button saves the DrawingCanvas as an image, just like the SaveButton It stores the full filename in MyValues Then it shows all apps that can use an image file © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

Bronze Badge The bronze version of the app is complete! This is a complex app and you should feel very accomplished when you are finished! © Copyright 2014 Barbara Ann Walters. All Rights Reserved.

App Inventor 2 Attribution Provided by MIT App Inventor was originally developed by Google Licensed under the Creative Commons Attribution 3.0 Unported license deed.en_US © Copyright 2014 Barbara Ann Walters. All Rights Reserved.