Flag Quiz Game App Android How to Program ©1992-2013 by Pearson Education, Inc. All Rights Reserved.

Slides:



Advertisements
Similar presentations
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
Advertisements

© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Chapter 7: Creating Database Reports
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction To Form Builder
Basic Animation. Animation 4 options – Animated.gif – Frame by Frame animation – Tweened animation This is our focus – OpenGL ES Graphics API for more.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
HTML, XHTML, and CSS Chapter 12 Creating and Using XML Documents.
Chapter 10: Move! Creating Animation
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Flag Quiz App 1 CS7030: Mobile App Development. assets Folder 2 CS7030: Mobile App Development  drawable folder – Image contents at the root level 
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introducing Web Controls Outline 29.1 Analyzing the.
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
Basic Android Tutorial USF’s Association for Computing Machinery.
Doodlz App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
DUE Hello World on the Android Platform.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
JavaScript: Functions © by Pearson Education, Inc. All Rights Reserved.
 2009 Pearson Education, Inc. All rights reserved Introduction to the Visual Basic Express 2008 IDE.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
SpotOn Game App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Dreamweaver MX. 2 Overview of Templates n Templates represent a web page design or _______ that will be common to multiple pages. n There are two situations.
Android Boot Camp for Developers Using Java, 3E
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 17 – Flag Quiz Application Introducing One-Dimensional.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 7 – Creating and Using Templates in a Web.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
First Venture into the Android World Chapter 1 Part 2.
Topics Introduction Scene Graphs
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 2.1 Test-Driving the Welcome Application 2.2.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2 Revised by Dr. T. Tran for CSI3140.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
Styles, Dialog Boxes, and Menus. Styles Allow creation of a common format – placed in res/values/styles.xml – file name is incidental Can be applied.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
Basic Animation. Animation 4 options – Animated.gif – Frame by Frame animation – Tweened animation This is our focus – OpenGL ES Graphics API for more.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Motion Graphics & Animation.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 14 Event-Driven Programming with Graphical User Interfaces.
Intoduction to Andriod studio Environment With a hello world program.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
Chapter 29. Copyright 2003, Paradigm Publishing Inc. CHAPTER 29 BACKNEXTEND 29-2 LINKS TO OBJECTIVES Attach an XML Schema Attach an XML Schema Load XML.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
Field Trip #30 A Memory Game By Keith Lynn. View A View is the basic building block of an app Some Views hold other views An example of this is GridLayout.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 10: Move! Creating Animation 1 Android.
 2007 Pearson Education, Inc. All rights reserved Introduction to the Visual Basic Express 2005 IDE.
INTRODUCTION TO ANDROID. Slide 2 Introduction I take a top-down approach to describing an application’s anatomy.
The Flag Quiz app tests your ability to correctly identify 10 flags from various countries and territories.
Dive Into® Visual Basic 2010 Express
Java FX: Scene Builder.
Chapter 1: An Introduction to Visual Basic 2015
Cannon Game App Android How to Program
Android Developer Fundamentals V2 Lesson 1
Presentation transcript:

Flag Quiz Game App Android How to Program © by Pearson Education, Inc. All Rights Reserved.

Test drive app Quiz progress Current Flag Answer options

© by Pearson Education, Inc. All Rights Reserved.

# #FFFFCC #00CC00 #FF0000

© by Pearson Education, Inc. All Rights Reserved.

The answer Buttons will be dynamically added. NOTE: There are 3 rows, but two of them may be left empty.

© by Pearson Education, Inc. All Rights Reserved.

The answer Buttons © by Pearson Education, Inc. All Rights Reserved. When you answer, “What type of resource…?” Select as the root element Button.

Creating Shake Animation Defined in an.xml file (SURPRISE!) Right click the layout folder, select New > Other In the Android node, select Android XML file, click Next> to display the New Android XML File In the File text field enter the name incorrect_shake.xml Under “What type of resource….?”, select the Animation radio button. ▫ Puts the new file into the project’s res/anim folder At bottom of dialog, select set as the animation’s root element Click finish Configure properties © by Pearson Education, Inc. All Rights Reserved.

3 translate animations in this animation set Animation set may contain Any combination of tweened animations: Alpha (transparency) Scale Translate (moves a view within parent) rotate fromXDelta is View’s offset when animation starts toXDelta is offset when It ends How long animation last in milliseconds So animations don’t run in parallel

Technologies Overview Using App’s Assets Folder ▫ Can drag folders of images to here ▫ Must be accessed via AssetManager to open InputStream to read file Using Menu ▫ Override Activity’s onCreateOptionsMenu ▫ onOptionsItemSelected is the event handler method that responds to user’s selection Using Runnable ▫ Use a Handler object to execute Runnable to delay displaying next flag © by Pearson Education, Inc. All Rights Reserved.

Technologies Overview Applying Animation to an ImageView ▫ Use AnimationUtils static method loadAnimation to load animation from.xml file ▫ Specify # times animation should repeat with method setRepeatCount ▫ Call startAnimation to perform the animation Logging Exception Messages ▫ For debugging purposes ▫ Use try/catch blocks when processing files ▫ Can view logged messages with Android logcat tool. © by Pearson Education, Inc. All Rights Reserved.

Using ArrayList Import package for this templated data structure Expandable “array” Can access like an array, has methods, process with for each loop private List list; list = new ArrayList (); int numItems = list.size(); list[i] = myString; myString = list.get(index); for (String s : list) //use s somehow; can’t change it if (s.equals(keyString)) count++; list.add(anotherString); list.remove (index); or list.remove(theString); list.clear(); Collections.shuffle (list); © by Pearson Education, Inc. All Rights Reserved.

Also a HashMap Using HashMap ▫ To store region names and corresponding Boolean values to indicate if region is enable or not ▫ Has methods we’ll see ▫ Can be processed with a for each loop We are using ArrayList and HashMap objects, but their references are of type List and Map, resp. ▫ Good Java practice, so we can change data structures easily without affecting rest of app’s code Also using interface Set when we want all keys in the HashMap © by Pearson Education, Inc. All Rights Reserved.

Building the FlagQuizGame App © by Pearson Education, Inc. All Rights Reserved. Data Structures Error logging Folders of images

© by Pearson Education, Inc. All Rights Reserved.

AndroidManifest File New Features android:theme attribute ▫ A theme is a set of styles that specify the appearance of a GUI’s components ▫ List of predefined styles and themes on the web android:screenOrientation ▫ The FlagQuizGame app should always be in portrait mode © by Pearson Education, Inc. All Rights Reserved.

AndroidManifest Editor /Application Tab © by Pearson Education, Inc. All Rights Reserved.

AndroidManifest File © by Pearson Education, Inc. All Rights Reserved.