发表在我的独立网站http://kesenhoo.github.io/blog/2013/06/30/android-training-ui-creating-custom-views-lesson-0/ ,欢迎访问!

Android的framework有大量的Views用来与用户进行交互并显示不同种类的数据。但是有时候你的程序有个特殊的需求,而Android内置的views组件并不能实现。这一章节会演示如何创建你自己的views,并使得它们是robust与reusable的。

Dependencies and Prerequisites

Android 2.1 (API level 7) or higher

YOU should also read

Try it out

Download the sample
CustomView.zip

Lesson

(1)创建一个View类

Create a class that acts like a built-in view, with custom attributes and support from the ADT layout editor.

(2)自定义Drawing

Make your view visually distinctive using the Android graphics system.

(3)使得View是可交互的

Users expect a view to react smoothly and naturally to input gestures. This lesson discusses how to use gesture detection, physics, and animation to give your user interface a professional feel.

(4)优化View

No matter how beautiful your UI is, users won’t love it if it doesn’t run at a consistently high frame rate. Learn how to avoid common performance problems, and how to use hardware acceleration to make your custom drawings run faster.

学习自:http://developer.android.com/training/custom-views/index.html,请多指教,谢谢!
转载请注明出自http://kesenhoo.github.com,谢谢配合!

【Android Training UI】创建自定义Views(Lesson 0 - 章节概览)的更多相关文章

  1. 【Android Training UI】创建自定义Views(Lesson 1 - 创建一个View类)

    发布在我的网站 http://kesenhoo.github.io/blog/2013/06/30/android-training-ui-creating-custom-views-lesson-1 ...

  2. 【Android Training UI】创建自定义Views(Lesson 2 - 自定义Drawing)

    发布在我的网站:http://kesenhoo.github.io/blog/2013/06/30/android-training-ui-creating-custom-views-lesson-2 ...

  3. Android Training - 使用IntentService运行任务(Lesson 1 - 创建IntentService)

    写在http://hukai.me/blog/android-training-18-running-background-service-lesson-1/ 版权声明:本文博客原创文章,博客,未经同 ...

  4. Android开发UI之自定义视图属性

    Android框架中,所有自定义的view类都继承自View,也可以继承Button等view的子类 为了允许ADT能够与view交互,必须提供一个能够获取Context和作为属性的Attribute ...

  5. Android开发UI之自定义动画

    自定义动画,需要新建一个类,继承Animation类. 重写applyTransformation()方法和initialize()方法. applyTransformation(float inte ...

  6. Android Training - 使用IntentService运行任务(Lesson 2 - 发送任务给IntentService)

    写在http://hukai.me/blog/android-training-18-running-background-service-lesson-2/

  7. .NET微信公众号开发-2.0创建自定义菜单

    一.前言 开发之前,我们需要阅读官方的接口说明文档,不得不吐槽一下,微信的这个官方文档真的很烂,但是,为了开发我们需要的功能,我们也不得不去看这些文档. 接口文档地址:http://mp.weixin ...

  8. Android创建自定义dialog方法详解-样式去掉阴影效果

    在自定义组件时,从已有组件源码中会很大收获.就拿progressDialog来说     间接父类是dialog,想了解dialog继承结构可以去百度,或者    从构造器来说ProgressDial ...

  9. 创建自定义视图在Android矩阵效果画布教程

    介绍 下面是一个快速教程,教你如何在Android中创建自定义视图.自定义视图创建一个矩阵雨效果. 本教程发布在http://www.androidlearner.com/. 背景 下面是关于如何工作 ...

随机推荐

  1. UESTC_冬马党 CDOJ 882

    冬马党 Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit Statu ...

  2. 360WIFI下使用Fiddler抓取手机APP流量

    过程其实很简单,仅仅做个记录.过程适用Android和ios手机 fidder的原理如下: 下面开始步骤: 1.在fidder中设置代理:Tools--->Fidder Options,设置端口 ...

  3. eclipse中如何创建maven项目

    1.在eclipse中,file-->new-->maven project,勾选Create a simple project,点击next. 2.添加项目信息,点击finish.(pa ...

  4. 代码中实际运用memcached——.NET

    本文取自:http://blog.csdn.net/dyllove98/article/details/9115947 memcached安装:============================ ...

  5. 布局文件提示错误“No orientation specified, and the default is horizontal. This is a common so...”

    完整的错误提示信息为:No orientation specified, and the default is horizontal. This is a common source of bugs ...

  6. QT笔记(1)--QT编程环境搭建

    一.QT简介 Qt  是一个1991年由奇趣科技开发的跨平台C++图形用户界面应用程序开发框架.它既可以开发GUI程序,也可用于开发非GUI程序,比如控制台工具和服务器.Qt是面向对象的框架,使用特殊 ...

  7. Oracle Linux Server 7安装VMwareTools问题

    OracleLinuxServer7安装VMwareTools问题#./vmware-install.pl时报错:#-bash: ./vmware-instal.pl:/usr/bin/perl:ba ...

  8. Java使用默认浏览器打开指定URL

    直接贴代码: 方法一: Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://www.baidu.co ...

  9. 自定义view(自定义view的时候,三个构造函数各自的作用)

    package com.timeshare.tmband.Utils; import android.content.Context; import android.content.res.Typed ...

  10. 【常用小命令】解决windows下有些文件文件名识别不了导致删除不了的问题

    在百度上找的解决方案哈,只为自己存档一份. 因为发现现在从csdn上下载的文件都是“.pdf_”格式,下载2个文件,将一个文件格式改成 “.pdf”,另一个文件就扔回不了回收站了, 所以没有办法就找各 ...