文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > android界面设计
侵权投诉

android界面设计

Android界面设计

主要涉及以下四个包的相关内容:

android.content.res 资源类

android.graphics 底层图形类

android.view 显示类

android.widget 控件类

一、android.content.res.Resources

对于Android平台的资源类android.content.res.Resources可能很多网友比较陌生,一起来看看SDK上是怎么介绍的吧,Contains classes for accessing application resources, such as raw asset files, colors, drawables, media or other other files in the package, plus important device configuration details (orientation, input types, etc.) that affect how the application may behave.平时用到的二进制源文件raw、颜色colors、图形drawables和多媒体文件media的相关资源均通过该类来管理。

int getColor(int id) 对应res/values/colors.xml

Drawable getDrawable(int id) 对应res/drawable/

XmlResourceParser getLayout(int id) 对应res/layout/

String getString(int id) 和CharSequence getText(int id) 对应res/values/strings.xml

InputStream openRawResource(int id) 对应res/raw/

void parseBundleExtra (String tagName, AttributeSet attrs, Bundle outBundle) 对应res/xml/

String[] getStringArray(int id) res/values/arrays.xml

float getDimension(int id) res/values/dimens.xml

二、android.graphics.Bitmap

作为位图操作类,Bitmap提供了很多实用的方法,常用的我们总结如下:

boolean compress(Bitmap.CompressFormat format, int quality, OutputStream stream) 压缩一个Bitmap对象根据相关的编码、画质保存到一个OutputStream中。其中第一个压缩格式目前有JPG和PNG

void copyPixelsFromBuffer(Buffer src) 从一个Buffer缓冲区复制位图像素

void copyPixelsToBuffer(Buffer dst) 将当前位图像素内容复制到一个Buffer缓冲区 我们看到创建位图对象createBitmap包含了6种方法在目前的Android 2.1 SDK中,当然他们使用的是API Level均为1,所以说从Android 1.0 SDK开始就支持了,所以大家可以放心使用。

static Bitmap createBitmap(Bitmap src)

static Bitmap createBitmap(int[] colors, int width, int height, Bitmap.Config config)

static Bitmap createBitmap(int[] colors, int offset, int stride, int width, int height, Bitmap.Config config)

static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height, Matrix m, boolean filter)

static Bitmap createBitmap(int width, int height, Bitmap.Config config)

static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height)

第1页

你可能喜欢

  • 界面设计总结
  • 阿里巴巴设计
  • 设计规范
  • Android开发
  • 用户体验界面设计
  • 游戏界面设计
  • UI界面设计
  • 人机界面设计

热门文档

相关文档

  • Android界面设计一些总结

    Android 界面设计总结 1、如何去除界面顶部标题栏 title: 有两种方法:1、在程序中添加。setContent(R.layout.main)之前添加去除 title 语句—— requestWindow...

  • 基于Android技术的界面设计与研究

    Android 技术的界面设计与研究赵亮 1,张维 2 (徐州建筑职业技术学院,江苏 徐州 221000 ) 摘要: 详细介绍了 google 发布的新一代智能手机平台 Android 的基本...

  • Android的界面设计规范

    Android的界面设计规范_计算机软件及应用_IT/计算机_专业资料。Android UI 界面设计Android 的界面设计规范作者:Bruce Lee 出处:http://www.cnblogs.com/BruceLee...

  • Android用户界面设计

    Android用户界面设计 Android用户界面设计:使用片段 Android 3.0引入的新的片断(Fragment)API,让我们更容易地创建动态用户界面。在这个教程中,我们学习如 何将一个...

  • android UI界面设计

    Android UI 开发专题(一) 之界面设计 发帖日期:2010-02-09 10:49:28 标签:ophone 近期很多网友对 Android 用户界面的设计表示很感兴趣,对于 Android UI 开发自...

  • Android开发UI界面设计之按钮状态

    Android开发UI界面设计之按钮状态_计算机软件及应用_IT/计算机_专业资料。一些关于android 界面的处理和细节的修饰的文档Android 开发 UI 界面设计 ON 六 16 2011 ...

  • android_UI界面设计

    开发专题( Android UI 开发专题(一) 之界面设计 发帖日期:2010-02-09 10:49:28 标签:ophone 近期很多网友对 Android 用户界面的设计表示很感兴趣,对于 Android...

  • Android 应用界面设计

    Android 应用界面设计_计算机软件及应用_IT/计算机_专业资料。android界面Android 应用界面设计 与 iOS 相比,Android 系统界面存在各种不协调,应用 界面本身缺乏统一...

  • Android_界面设计

    (typeFace); } } Android 界面刷新方法 Android 提供了 Invalidate 方法实现界面刷新,但是 Invalidate 不能直接在线程中调用, 因为他是违背了单线程模型:Android ...

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

    近期很多网友对 Android 用户界面的设计表示很感兴趣,对于 Android UI 开发自绘控件和 游戏制作而言掌握好绘图基础是必不可少的。本次专题分 10 节来讲述,有关 ...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email