Mobile Computing Lecture#12 Graphics & Animation.

Slides:



Advertisements
Similar presentations
Android Fonts Notes are based on: The Busy Coder's Guide to Android Development by Mark L. Murphy Copyright © CommonsWare, LLC. ISBN:
Advertisements

Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Who Am I And Why Am I Here I’m professor Stephen Fickas in CIS – you can call me Steve. I have a research group that works with mobile devices (since 1995!)
User Interface Android Applications. Activities An activity presents a visual user interface. Each activity is given a default window to draw in. The.
Android Form Elements. Views Provide common UI functionality Form elements: text area, button, radio button, checkbox, dropdown list, etc. Date and time.
The Android GUI Framework Android experience day December 2008 Markus Pilz Peter Wlodarczak.
Android Application Development with Java UPenn CS4HS 2011 Chris Murphy
@2011 Mihail L. Sichitiu1 Android Introduction Hello World.
Presenting Lists of Data. Lists of Data Issues involved – unknown number of elements – allowing the user to scroll Data sources – most common ArrayList.
Basic Animation. Animation 4 options – Animated.gif – Frame by Frame animation – Tweened animation This is our focus – OpenGL ES Graphics API for more.
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Basic Drawing Techniques
2D Graphics: Part 2.
Chapter 10: Move! Creating Animation
6-2 2D Graphics CSNB544 Mobile Application Development Thanks to Utexas Austin.
Mobile Computing Lecture#08 IntentFilters & BroadcastReceivers.
ANDROID – INTERFACE AND LAYOUT L. Grewe. Interfaces: Two Alternatives Code or XML  You have two ways you can create the interface(s) of your Application.
Animation.
1/29/ Android Programming: FrameLayout By Dr. Ramji M. Makwana Professor and Head, Computer Engineering Department A.D. Patel.
Import import android.graphics.Bitmap; import android.widget.ImageView;
Android Graphics Library. Color Android colors are represented with four numbers, one each for alpha, red, green, and blue (ARGB). Each component can.
1 Introducing Activity and Intent. 2 Memory LinearLayout, weight=2 LinearLayout, weight=1 TextView ListView.
ANDROID – DRAWING IMAGES – SIMPLE EXAMPLE IN INTERFACE AND EVENT HANDLING L. Grewe.
Announcements Homework #2 will be posted after class due Thursday Feb 7, 1:30pm you may work with one other person No office hours tonight (sorry!) I will.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
Unit 7 – Desktop Publishing Animation Animation Skills Lesson – Overview of Adobe Flash Canvas TimeLine Tools Properties.
Basic Animation. Animation 4 options – Animated.gif – Frame by Frame animation – Tweened animation This is our focus – OpenGL ES Graphics API for more.
Android and s Ken Nguyen Clayton state University 2012.
Basic 2D Graphics in Android. Android Graphics Programming There are many ways to do graphics programming in Android – 2D vs. 3D – static vs. dynamic.
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.
David Sutton 2D GRAPHICS IN ANDROID. INTRODUCTION AND OUTLINE  In this week’s session we will create a simple Kaleidoscope application. Topics that will.
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.
Lecture 3: Animation & Graphics Topics: Animation, Graphics, Drawing Date: Feb 2, 2016.
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Android Programming.
Android Programming - Features
Android Application 2D Graphics cs.
Lecture 3: Animation & Graphics
Cleveland State University
Lecture 3 Zablon Ochomo Android Layouts Lecture 3 Zablon Ochomo
Android Introduction Hello World
Android Application Development 1 6 May 2018
GUI Programming Fundamentals
CS499 – Mobile Application Development
Lecture 3: Animation & Graphics
Lecture 8: Graphics By: Eliav Menachi.
Android Introduction Hello World.
Android External Resources
2D Graphics: Part 2.
S.RENUKADEVI/AP/SCD/ANDROID - Notifications
ITEC535 – Mobile Programming
GUI AND GRAPHICS.
תכנות ב android אליהו חלסצ'י.
Mobile Computing With Android ACST 4550 Android Animation
Android Programming Lecture 6
CIS 470 Mobile App Development
CA16R405 - Mobile Application Development (Theory)
Graphics with Canvas.
BMI Android Application will take weight and height from the users to calculate Body Mass Index (BMI) with the information, whether user is underweight,
Android Developer Fundamentals V2
Lecture 3: Animation & Graphics
CIS 470 Mobile App Development
CIS 470 Mobile App Development
Lecture 8: Graphics By: Eliav Menachi.
Adding Components to Activity
ITEC535 – Mobile Programming
Mobile Computing With Android ACST 4550 Android Animation
Android Sensor Programming
Android Sensor Programming
Presentation transcript:

Mobile Computing Lecture#12 Graphics & Animation

Lecture Contents  Graphics & Animations  Drawing Shapes Programmatically  Drawing Shapes through XML  Frame Animation  Bouncing Globe Example  Tween Animation Example 2

Drawing a Shape 1. Import the graphics packages 2. Create a View 3. Create a ShapeDrawable to hold our Drawable 4. Create any Shape and assign it to mDrawable 5. The onDraw method is called to draw the graphics 6. Set the boundaries and draw the shape on the canvas 3

Drawing Rectangle 4

Drawing through XML <ScrollView xmlns:android=" android:layout_width="fill_parent" android:layout_height="wrap_content"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageView android:layout_width="fill_parent" android:layout_height="50dip" /> 5

Drawing through XML 6 <shape xmlns:android=" apk/res/android" type="rectangle"> _______________________ public class Main extends Activity protected void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.xmlrectangle); }

Multiple Shapes with XML 7

Multiple Shapes 8 SHAPE1 SHAPE5

Multiple Shapes 9 SHAPE2 LINE

Multiple Shapes 10

Frame Animation 11

Main Layout 12

Main.java 13

Main.java …. continue 14

Main.java …. continue 15

Main Points (Frame Animation Example) 1. Bind resources to the ImageView. 2. Call the subclasses MyAnimationRoutine and MyAnimatinoRoutine2 which start and stop the Animation respectively. 3. MyAnimationRoutine extends TimerTask to allow for a wait time before it starts the animation. 4. MyAnimationRoutine2 extends TimerTask to allow for a wait time before it stops the animation from running. 16

Bouncing Globe Example… 17

Bouncing Globe Example … 18

Bouncing Globe Example … 19

Tween Animation Example 20

Tween Animation Example 21

Tween Animation 22

News Feeds Example (News) 23

News Feeds Example (Layout) 24

NewsFeedActivity.java (code…) 25

NewsFeedActivity.java (code…) 26