摘要: 一、判断网络连接是否可用public static boolean isNetworkAvailable(Context context) { ConnectivityManager cm = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); if (cm == null) { } else { //如果仅仅是用来判断网络连接 //则可以使用 cm.getActive... 阅读全文
posted @ 2012-04-23 22:18 清水居士 阅读(36914) 评论(0) 推荐(2) 编辑
摘要: 1、Drawable就是一个可画的对象,其可能是一张位图(BitmapDrawable),也可能是一个图形(ShapeDrawable),还有可能是一个图层(LayerDrawable),我们根据画图的需求,创建相应的可画对象2、Canvas画布,绘图的目的区域,用于绘图3、Bitmap位图,用于图的处理4、Matrix矩阵二、Bitmap1、从资源中获取BitmapResources res = getResources(); Bitmap bmp = BitmapFactory.decodeResource(res, R.drawable.icon); 2、Bitmap → byte... 阅读全文
posted @ 2012-04-23 10:30 清水居士 阅读(1366) 评论(0) 推荐(0) 编辑