下载此文档

Android UI 开发专题(一) 之界面设计.doc


文档分类:IT计算机 | 页数:约6页 举报非法文档有奖
1/6
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/6 下载此文档
文档列表 文档介绍
近期很多网友对Android用户界面的设计表示很感兴趣,对于Android UI开发自绘控件和游戏制作而言掌握好绘图基础是必不可少的。本次专题分10节来讲述,有关OpenGL ES相关的可能将放到以后再透露。本次主要涉及以下四个包的相关内容Bitmap对象的I/O类,BitmapFactory类提供了丰富的构造Bitmap对象的方法,比如从一个字节数组、文件系统、资源ID、以及输入流中来创建一个Bitmap对象,下面本类的全部成员,除了decodeFileDescriptor外其他的重载方法都很常用。
static Bitmap  decodeByteArray(byte[] data, int offset, int length) //从字节数组创建
static Bitmap  decodeByteArray(byte[] data, int offset, int length, opts)
static Bitmap  decodeFile(String pathName, opts) //从文件创建,路径要写全
static Bitmap  decodeFile(String pathName)
static Bitmap  decodeFileDescriptor(FileDescriptor fd, Rect outPadding, opts)  //从输入流句柄创建
static Bitmap  decodeFileDescriptor(FileDescriptor fd)
static Bitmap
  decodeResource(Resources res, int id)  //从Android的APK文件资源中创建,android123提示是从/res/的drawable中
static Bitmap  decodeResource(Resources res, int id, opts)
static Bitmap  decodeResourceStream(Resources res, TypedValue value, InputStream is, Rect pad, opts)
static Bitmap  decodeStream(InputStream is)  //从一个输入流中创建
static Bitmap  decodeStream(InputStream is, Rect outPadding, opts)
 四、
 从J2ME MIDLET时我们就知道Java提供了Canvas类,而目前在Android平台中,它主要任务为管理绘制过程,The Canvas class holds the "draw" calls. To draw something, you need 4 basic components: A Bitmap to hold the pixe

Android UI 开发专题(一) 之界面设计 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数6
  • 收藏数0 收藏
  • 顶次数0
  • 上传人q1188830
  • 文件大小28 KB
  • 时间2022-06-22