0% found this document useful (0 votes)
17 views20 pages

Lecture 2.1.3

Uploaded by

Anurag Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views20 pages

Lecture 2.1.3

Uploaded by

Anurag Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

INSTITUTE : UIE

DEPARTMENT : CSE
Bachelor of Engineering (Computer Science &
Engineering)
Mobile Application Development (21CSH-355/21ITH-
355)
TOPIC OF PRESENTATION:
Introduction to Android graphics

Prepared by:
Parveen Kumar Saini(E13339)
DISCOVER . LEARN .
www.cuchd.in Computer
University Science and
Institute EMPOWER
Engineering
of Engineering Department
(UIE)
Introduction to Android graphics

2
www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
Introduction to Android graphics

• Android provides a huge set of 2D-drawing APIs that allow you to create graphics.
• Android has got visually appealing graphics and mind blowing animations.
• The Android framework provides a rich set of powerful APIS for applying animation to UI
elements and graphics as well as drawing custom 2D and 3D graphics.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
Following are the three animation systems used in Android applications:

• Animation is a method by which still figures are manipulated to appear as moving images.

• Three animation systems used in Android applications.


1. Property Animation
2. View Animation
3. Draw able Animation

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
Property Animation

• A property animation changes a property's (a field in an object) value over a specified length of
time.
• To animate something, you specify the object property that you want to animate, such as an
object's position on the screen, how long you want to animate it for, and what values you want to
animate between.
• Property animation is the preferred method of animation in Android.
• This animation is the robust framework which lets you animate any properties of any objects, view
or non-view objects.
• The android. Animation provides classes which handle property animation.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
View Animation

• What is View Animation?


• View animation is a type of animation that changes the view of an object, such as its visibility or
opacity.
• It is used to create more dramatic effects, such as making an object appear or disappear.
• View Animation is also called as Tween Animation.
• The android.view.animation provides classes which handle view animation.
• This animation can be used to animate the content of a view.
• It is limited to simple transformation such as moving, re-sizing and rotation, but not its background
color.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
Draw able Animation

• A drawable resource is a general concept for a graphic that can be drawn to the screen and which
you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with
attributes such as android:drawable and android:icon . There are several different types of
drawables: Bitmap File.
• What is a BMP File? Short for Bitmap Image file, BMP is an image file format that contains
bitmap graphics data. BMP images are device independent and require no graphics adapter
to display them. Image data in BMP files are usually uncompressed or compressed with a
lossless compression.
• Drawable animation lets you load a series of Drawable resources one after another to create an
animation.
• Drawable animation is implemented using the AnimationDrawable class.
• This animation works by displaying a running sequence of 'Drawable' resources that is images,
frame by frame inside a view object.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
Canvas

• What is a Canvas?
• Canvas is a class in Android that performs 2D drawing of different objects onto the screen.
• The saying “a blank canvas” is very similar to what a Canvas object is on Android.
• It is basically, an empty space to draw onto.
• Android graphics provides low level graphics tools such as canvases, color, filters, points and
rectangles which handle drawing to the screen directly.
• The Android framework provides a set of 2D-DRAWING APIs which allows user to provide own
custom graphics onto a canvas or to modify existing views to customize their look and feel.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
There are two ways to draw 2D graphics,

1. Draw your animation into a View object from your layout.

2. Draw your animation directly to a Canvas.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
Some of the important methods of Canvas Class are as follows

i) drawText()
ii) drawRoundRect()
iii) drawCircle()
iv) drawRect()
v) drawBitmap()
vi) drawARGB()

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
• You can use these methods in onDraw() method to create your own custom user interface.
• Drawing an animation with a View is the best option to draw simple graphics that do not need to
change dynamically and are not a part of a performance-intensive game.
• It is used when user wants to display a static graphic or predefined animation.
• Drawing an animation with a Canvas is better option when your application needs to re-draw itself
regularly.
• For example video games should be drawing to the Canvas on its own.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
Sprucing up Mobile Apps

• How to Spruce Up Mobile Application?


• In this modern era, the use of apps is everywhere from healthcare to agriculture, education to
music, food delivery to material buying, etc.
• Today’s world is incomplete without mobile apps. So as this technology is at the boom, so most
people try to learn this technology
• i.e how to create apps, and they will learn it easily with very little difficulty. But the main difficulty
occurs when we publish our app didn’t spruce up.
• Everyday apps are submitted to the Play Store or the Apps store on a large scale.
• Although more than half of them are rejected or didn’t become popular even among less number
of people.
• The main problem is that why these apps are not spruced up or failed because of their poor design
or other minor but important rules.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
How we will Spruce Up Our Mobile Application
• Focus on Interactive Design
• Goal-Driven Design
• Desirability
• Function Familiarity
• Response to user

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
1. Focus on Interactive Design

• The design of your app is the major part that grabs more audience.
• Here the rule “First Impression is the Last Impression” works.
• If the User Interface of your app is not good, it may be possible that the engagement of People
toward your app will fail.
• Also, if one’s app is really solving the major problem but having poor design will lead to a very
less number of downloads.
• So, therefore the interactive design is important in order to please the end-user.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
2. Goal-Driven Design

• While solving a problem through app development one thing we have to take care of is the design
that we are creating must be having Goal-Driven Design.
• It means without knowing the target audience who will use this application, one can’t possibly
design the application.
• We must know the audience like it is for Children, Adults, Technical Persons, or for Common
Persons.
• Example: If we are designing the app for Kids so must take care of the design and design it
accordingly like adding attractive Images instead of using work, make it simple so that kids will
interact easily.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
3. Desirability

• The app’s interface will be usable or desirable enough. If one’s app design is not desirable, users
won’t use it.
• One’s app must be accessible and usable enough not for Technical but also for Novice persons.
• Also, the design of our app is designed in such a way that it is not only easy to use but also creative
enough so that the target audience will not bore from it.
• Example: In a simple Job search app, it would be expected that a user will sort out the job tags
according to their specifications.
• So this feature will enhance the performance of it and users will extract desirable or useful out of
the pool of data present on that app.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
4.Function Familiarity

• The application that we are creating is suitable enough that every person didn’t face any difficulty
regarding the functionality of it.
• Simply it would be user-friendly and users will know after clicking this button or widget where
they will reach etc.
• Example: In Social Media Apps, a novice user will easily understand how to upload photos, how
to like or comment, and how to message.
• Also in tagging to someone a novice user will not use it because of non familiarity with this
functionality.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
5. Response to user

• The app should be designed in such a way that the app will respond to the user if he is doing
incorrect action or missed something etc.
• Example: While filling data, the user will fill in his phone number for creating an account exceed
the length, so this app should be smart enough to respond.
• This same occurs while setting up passwords, the app will efficiently respond in case of the week
or strong password.
• Also, When someone messages us, we get notifications which is also a good example of App
response to users.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
6 Color Selection
• While designing the app, our app should not only user-friendly or effective but also its success is
depending upon the Color we choose.
• The app designer will follow Color trends in order to get maximum efficiency. Lets’ discuss some
color with predefined meanings:
• Red Color Simply implies to Call to Action, or it is also used where some cases are impulsive.
• The yellow color implies optimism and delight.
• Green color associate with Nature and Environment. Also, green color also associated with Money or
wealth.
• Orange represents excitement and enthusiasm.
• Blue Color determines Security and Prosperity.
• In various play store’s, users will download the unknown app on the basis of the first appearance of
the Icon of the app.
• The type of color for the Icon of App will depend upon what type of service we are providing to users.
• So the color of our Application icon and used in the User Interface really spruce up Mobile
Application.

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE)
THANK YOU

For queries
Email:
[email protected]

www.cuchd.in Computer
University Science and
Institute Engineering Department
of Engineering (UIE) 20

You might also like