最近的文章列表

Android开发之SkBitmap的内存管理(画图动作)

   SkBitmap是skia中很重要的一个类,很多画图动作涉及到SkBitmap,它封装了与位图相关的一系列操作,了解它的内存管理策略有助于我们更好的使用它,了解它的初衷是要想实现对skia中的blitter进行硬件加速。

2014/11/24 Comments:
Android开发怎么调试的实例 android.util.Log
  package AndroidApi;
  import android.util.Log;
  class Monitoring implements Runnable
  {
  public void run()
2014/11/23 Comments:
Android实现创建可复用的UI组件

 Android平台提供了广泛的UI可视组件---widget,把这些小的可视的构件组合到一起,就可以给用户提供复杂而有用的界面。但是,应用程序经常需要一些高级可视组件,要满足这样的需求,并要达到高效的目的,可以把一些标准的widget组合成一个新的可复用的组件。

  例如,包含一个进度条和一个取消按钮的操作进度表示组件;包含两个按钮的面板(取消和确认操作);带有一个图标、标题和说明的面板等等。通过编写定制的View类能够很容易的创建UI组件,但是使用XML会更加容易。

2014/11/22 Comments:
Android实现文件夹和文件的排序功能 compare
static Comparator<File> comparator = new Comparator<File>() {
  public int compare(File f1, File f2) {
  if (f1 == null || f2 == null) {// 先比较null @camnpr
  if (f1 == null) {
2014/11/21 Comments:
Android程序raw文件放在sd卡代码实例代码
   void copyAssets()
  {
  String[] files;
  try
  {
  files = this.getResources().getAssets().list("");
  }
  catch (IOException e1)
2014/11/20 Comments:
Android客户端通过TelephonyManager获取手机号码代码实例
//创建电话管理
  TelephonyManager tm = (TelephonyManager)
  //与手机建立连接
  StartActivity.this.getSystemService(Context.TELEPHONY_SERVICE);
  //获取手机号码
2014/11/20 Comments:
Android开发中Bitmap源码实例参考

 安卓开发中Bitmap源码实例

  package android.graphics;
  import java.awt.image.BufferedImage;
  import java.io.File;
  import java.io.IOException;
2014/11/19 Comments:
Android开发游戏音效代码实例参考

代码示例如下:

//音效的音量
  int streamVolume;
  //定义SoundPool 对象 private SoundPool soundPool;
  //定义HASH表 private HashMap<Integer, Integer> soundPoolMap;
  /***************************@camnpr************************************ * Function: initSounds();
2014/11/18 Comments:
Android使用Webview显示OAuth Version 2.a ImplicitGrant方式授权访问网页

   Android授权访问网页,使用Webview显示OAuth Version 2.a ImplicitGrant方式授权的页,移动终端不建议使用Authorize code grant方式授权:

2014/11/7 Comments:
Android使用带List参数和SQL语句的构造方法 创建或升级数据库(SQLiteDatabase)时执行的语句

   Android创建或升级数据库时执行的语句,如果是创建或升级数据库,请使用带List参数的构造方法,带SQL语句的构造方法将在数据库创建或升级时执行。

2014/11/7 Comments: