Flag Quiz App 1 CS7030: Mobile App Development. assets Folder 2 CS7030: Mobile App Development  drawable folder – Image contents at the root level 

Slides:



Advertisements
Similar presentations
App Customization. Introduction  Not all Android apps look the same  i.e. the default bland black and white look  Most have custom looks like  Background.
Advertisements

Adobe Flash CS4 – Illustrated Unit E: Optimizing and Publishing a Movie.
Chapter 6 Preparing and Publishing Applications. Chapter 6 Lessons 1.Publish movies 2.Reduce file size to optimize a movie 3.Create a preloader 4.Publish.
Images. PImage class PImage is a class for loading and displaying an image in Processing. Declare a PImage type: PImage img; Make a new instance by loading.
CS378 - Mobile Computing 2D Graphics A Crash Course in Using (Android) 2D Graphics Libraries.
CSE 3345 Spring 2014 Android Test. Overview Create a simple Android Application that allows a user to View all 3 starting Pokémon and choose their starting.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
Images and Tables. Displaying Image Attributes: SRC= " mypic.gif " – Name of the picture file SRC= " pic/mygif.jpg " – Name of file found in pic directory.
Basic Animation. Animation 4 options – Animated.gif – Frame by Frame animation – Tweened animation This is our focus – OpenGL ES Graphics API for more.
© 2010 Delmar, Cengage Learning Chapter 6: Preparing and Publishing Movies.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
Sprite Animation CSE 391 Fall 2012 Tony Scarlatos.
Basic Drawing Techniques
Lecture Series on Android Programming Lecturer: Prof.Luqun Li Teaching Assistants: Fengyou Sun, Haijun Yang, Ting.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Concurrency in Android with.
Chapter 10: Move! Creating Animation
6-2 2D Graphics CSNB544 Mobile Application Development Thanks to Utexas Austin.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Chapter 2: Simplify! The Android User Interface
XHTML Images. Images are important Purpose: to enhance your web site. Add only when they complement or add additional impact to your message.
Images, Links, and Multimedia. Directories and Pathnames.
Resources and RelativeLayouts. Resources Android Resources We’ve already talked about the different types of Android Resources DirectoryResource Type.
Animation.
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
SpotOn Game App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 7: Reveal! Displaying Pictures in a GridView.
Android Boot Camp for Developers Using Java, 3E
Chapter 7: Reveal! Displaying Pictures in a Gallery.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
Resizing Images CS 268. Where to start? Pictures (of course)  Need to down size them for the web.  Pictures taken with a 10 mega pixel camera are usually.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Adding Graphical Elements Essentials for.
Field Trip #32 Digital Alarm Clock By Keith Lynn.
Introduction to Objective-C and Xcode (Part 5) FA 175 Intro to Mobile App Development.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
Animations 1 Fall 2012 CS2302: Programming Principles.
ANDROID – DRAWING IMAGES – SIMPLE EXAMPLE IN INTERFACE AND EVENT HANDLING L. Grewe.
Adding Images. XHTML Element ElementAttributeAttribute Value Closing tag AttributeAttribute Value The src attribute supplies the name and location of.
Mobile Programming Lecture 11 Animation and TraceView.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
Tutorial 3 Creating Animations. XP Objectives Learn the different elements of animation Create frames and layers Organize frames and layers using the.
1 Mobile Computing Handling Different Display Sizes Copyright 2015 by Janson Industries.
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.
Flag Quiz Game App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Lecture 8 the Preference Menu. Settings... Sudoku settings s Music Play background music Hints Show hints during play We add some strings to the strings.xml.
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.
By: Eliav Menachi.  Android custom 2D graphics library  OpenGL ES 1.0 for high performance 3D graphics.
Adobe Flash Professional CS5 – Illustrated Unit E: Optimizing and Publishing a Movie.
CHAPTER 5 Graphics Drawing Audio. Chapter objectives: Learn to draw to a canvas Examine the process of adding drawn elements and UI controls to a layout.
The Flag Quiz app tests your ability to correctly identify 10 flags from various countries and territories.
Chapter 2: Simplify! The Android User Interface
Android Application 2D Graphics cs.
Lecture 3: Animation & Graphics
滑動版面 建國科技大學 資管系 饒瑞佶 2013/7 V1.
CS499 – Mobile Application Development
Lecture 3: Animation & Graphics
S.RENUKADEVI/AP/SCD/ANDROID - Notifications
MAD.
Creation of an Android App By Keith Lynn
HTML Images CS 1150 Spring 2017.
Anatomy of an Android Application
Mobile Computing With Android ACST 4550 Android Animation
Android Layout Basics Topics
HTML Images CS 1150 Fall 2016.
Lecture 3: Animation & Graphics
Presentation transcript:

Flag Quiz App 1 CS7030: Mobile App Development

assets Folder 2 CS7030: Mobile App Development  drawable folder – Image contents at the root level  assets folder – Images can be organized in subfolders – Accessed via AssetManager  AssetManager open an InputStream to read image file name; next create a Drawable object from the stream; finally display the object on an ImageView using setImageDrawable method – InputStream stream = assets.open(region + "/“ + nextImageName +".png"); Drawable flag = Drawable.createFromStream(stream,nextImageName); flagImageView.setImageDrawable(flag);

String Resource 3 CS7030: Mobile App Development  strings.xml – Create string array – Africa Asia Europe North_America Oceania South_America  getResources().getStringArray(R.array. regionsList);

Animation Category 1. Tweened Animations – Scale animations (resize) – Rotate animations – Alpha animations (transparency) – Translate animations (move) 2. Frame-by-Frame Animations  An animation set may contain any combination of tweened animations 4 CS7030: Mobile App Development

Animation xml file 5 <translate android:fromXDelta="0" android:toXDelta="-5%p" android:duration="100"/> <translate android:fromXDelta="-5%p" android:toXDelta="5%p" android:duration="100" android:startOffset="100"/> <translate android:fromXDelta="5%p" android:toXDelta="-5%p" android:duration="100" android:startOffset="200"/> CS7030: Mobile App Development

Attributes of Animations 6 CS7030: Mobile App Development  fromXDelta : the view’s offset when the animation starts  toXDelta : the view’s offset when the animation ends  These attributes can have – Absolute values (in pixels) – A percentage of the animated View’s size – A percentage of the animated View’s parent’s size – -5%p indicates the View move to the left by 5% of the parent’s width – 5% indicates the View move to the right by 5% of the View’s width  duration : how long the animation lasts in milliseconds  startOffset : the number of milliseconds into the future at which an animation should begin

Load Tweened Animations 7  Create a folder called anim under res folder  Create new xml files in the anim folder. Add a set tag in the xml files: <set xmlns:android="  Add rotate, alpha, scale, or translate tag in the set tag.  Use AnimationUtils.loadAnimation to load the xml file, and then create an object of Animation – shakeAnimation = AnimationUtils.loadAnimation(this, R.anim.incorrect_shake);  startAnimation – flagImageView.startAnimation(shakeAnimation); CS7030: Mobile App Development

Handler 8  postDelayed receives Runnable as arguments to execute and a delay in milliseconds  Each Handler instance is associated with a single thread and that thread's message queue.  There are two main uses for a Handler: – to schedule messages and runnables to be executed as some point in the future – to enqueue an action to be performed on a different thread than your own. CS7030: Mobile App Development