Crazy Android Handouts-Learn notes (vi)

Source: Internet
Author: User

7th Chapter

7.1 using simple pictures

7.1.1 Using Drawable objects

7.1.2 Bitmap and Bitmapfactory

7.2 Drawing

7.2.1 Android Drawing Basics: Canvas, paint, etc.

The Android drawing should inherit the view component and rewrite the OnDraw (canvas canvas) method, which represents the canvas that "attaches" to the specified view. Table 7.1 How to draw canvas

Paint represents a brush on a canvas, and the paint class is used primarily to set drawing styles, including brush colors, brush weights, fill styles, and so on.

7.2.2 Path Class

You can pre-link n dots into a "path" on the view and then call Canvas's DrawPath (path,paint) to draw the graph along the path.

Patheffect defines the drawing effect, and it has some subclasses.

7.2.3 Drawing Game Animations

( source \07\7.2\handdraw adopts double buffering to realize drawing board )

7.3 Graphics Effect processing

7.3.1 using the Matrix control transformation

The matrix is a rectangular tool class that itself cannot transform an image or component, but it can be combined with other APIs to control the transformation of graphics and components.

7.3.2 using Drawbitmapmesh to distort images

7.3.3 filling graphics with shader

7.4 Frame Animation

7.4.1 Animationdrawable and frames-per-frame animations are typically defined using XML resource files.

The animation represented by Animationdrawable is not played by default and must be started in the program.

7.5 Tween (Tween) animation

tweened Animation is the developer only need to specify animation start, animation end, and animation changes in the middle frame by the system calculation, fill.

7.5.1 Tween Animation and Interpolator

7.5.2 animation of position, size, degree of rotation, transparency change

7.5.3 Customizing tweened animations

7.6 Property Animations

API for 7.6.1 Property animations

7.6.2 Using Property animations

7.7 animating with Surfaceview

Drawing mechanism of 7.7.1 Surfaceview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.