Learning Android Canvas

0
(0)

Learning Android Canvas
 

  • Author:Mir Nauman Tahir
  • Length: 108 pages
  • Edition: 1
  • Publisher: Packt Publishing
  • Publication Date: 2013-11-25
  • ISBN-10: 1783285397
  • ISBN-13: 9781783285396
  • Sales Rank: #11256456 (See Top 100 Books)
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    Develop and deploy graphics-rich Android applications using Android Canvas

    Overview

    • Understand user interactions and respond to those actions
    • Discover how to work with graphics in Android from scratch
    • Using a step by step approach, create a graphics-rich, fully functional application
    • Use Nine-Patch image

    In Detail

    When you’re writing an application in which you would like to perform specialized drawing and/or control the animation of graphics, you should do so by drawing through a canvas. A canvas works for you as an interface to the actual surface upon which your graphics will be drawn-it holds all of your “draw” calls. Via the Android Canvas, your drawing is actually performed on an underlying Bitmap, which is placed into the window.

    Learning Android Canvas is a practical guide, which will help you develop applications that contain rich 2D graphics like backgrounds, buttons, and even some small games with static 2D graphics. The book is full of step-by-step lessons and practical examples. This book helps you develop rich graphical applications and some simple games.

    Learning Android Canvas will help you understand everything that is required to develop an Android application that involves creating 2D graphics from scratch to a fully functional complete application. You will start with zero knowledge of using graphics within Android applications and will then go step by step to learn about different objects and techniques. In the end you will be able to develop a complete application fully loaded with graphics and functions.

    The book will give you a detailed practical explanation of Nine-Patch images and its importance in designing layouts and backgrounds. We will also take a detailed look at user interactions such as touch, capturing the action, and responding to them accordingly. Finally we will have a working, fully functional graphic application that uses all the knowledge that we have acquired previously.

    What you will learn from this book

    • Create a drawable thread to take away the load from the main thread
    • Develop important drawables and shapes
    • Understand the actions performed by users, capturing them, and responding to them
    • Unfold the basics of nested layouts
    • Design your own View classes and use them in the main class
    • Discover the graphics used as backgrounds of the whole screen or controls like buttons
    • Draw on the Android Canvas and Views
    • Set up the listener for touch events

    Approach

    This book is a fast-paced, practical, step-by-step tutorial guide full of examples that are easy to follow and implement.

    Who this book is written for

    This book is a great resource for developers who have basic Android development knowledge and want to work on graphics-rich applications and games but are totally new to working with graphics and Android Canvas.

    Table of Contents

    Chapter 1: Getting Started with Android Canvas
    Chapter 2: Drawing Threads
    Chapter 3: Drawing and Drawables in Android Canvas
    Chapter 4: NinePatch Images
    Chapter 5: Touch Events and Drawing on Canvas
    Chapter 6: Putting it All Together

    中文:

    书名:学习Android画布

    使用Android Canvas开发和部署图形丰富的Android应用程序

    概述

    • 了解用户交互并响应这些操作
    • 了解如何从头开始在Android中使用图形
    • 使用循序渐进的方法,创建图形丰富、功能齐全的应用程序
    • Use Nine-Patch image

    详细地说

    当您正在编写一个应用程序,希望在其中执行专门的绘制和/或控制图形的动画时,您应该通过画布进行绘制。画布可以作为绘制图形所在的实际表面的界面–它包含您的所有绘制调用。通过Android画布,您的绘图实际上是在底层的位图上执行的,该位图被放置到窗口中。

    学习Android Canvas是一个实用指南,它将帮助您开发包含丰富2D图形的应用程序,如背景、按钮,甚至一些带有静态2D图形的小游戏。这本书充满了循序渐进的教训和实际例子。本书帮助您开发丰富的图形应用程序和一些简单的游戏。

    学习Android Canvas将帮助您了解开发Android应用程序所需的一切,包括从头开始创建2D图形到功能齐全的完整应用程序。您将从对在Android应用程序中使用图形一无所知开始,然后逐步了解不同的对象和技术。最终,您将能够开发一个完全加载图形和功能的完整应用程序。

    这本书将给你一个详细的实用解释九补丁图像及其在设计布局和背景的重要性。我们还将详细了解用户交互,例如触摸、捕获操作并相应地对其进行响应。最后,我们将拥有一个工作的、功能齐全的图形应用程序,它使用我们以前获得的所有知识。

    What you will learn from this book

    • 创建一个可抽出的线程,以从主线程中移除负载
    • 开发重要的图纸和形状
    • 了解用户执行的操作、捕获并对其做出响应
    • Unfold the basics of nested layouts
    • 设计您自己的View类并在主类中使用它们
    • 了解用作整个屏幕或按钮等控件的背景的图形
    • 在Android画布和视图上绘制
    • 为触摸事件设置监听程序

    方法

    这本书是一本快节奏的,实用的,一步一步的教程指南,充满了易于遵循和实施的例子。

    Who this book is written for

    这本书对于那些有基本的Android开发知识,想要开发图形丰富的应用程序和游戏,但对图形和Android Canvas完全陌生的开发人员来说,是一份很好的资源。

    Table of Contents

    第1章:Android Canvas入门
    Chapter 2: Drawing Threads
    Chapter 3: Drawing and Drawables in Android Canvas
    Chapter 4: NinePatch Images
    第5章:触摸事件和画布上的绘画
    Chapter 6: Putting it All Together

  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册