cocos2dx 遮罩层android真机机上失败的解决方案...
分类:
移动开发 时间:
2014-07-26 02:54:46
阅读次数:
233
这个事写qq表情的时候用到的,单独拿出来讲讲。
首先图片0到106张放在res里面,命名为F000到F106 如图
此时在程序里面定义一个方法
public void setData(String msg){
String str = msg;
//消息具体内容
String zhengze = "f0[0-9]{2}|f10[0-7]";
//正则表达式,用来判断消息内是否有表...
分类:
其他好文 时间:
2014-07-26 02:49:56
阅读次数:
218
??
这年头用gallery的已经很少了,此文提供一个一次滑动只滑动到下一页的方法(包括快速滑动)。
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.MotionEvent;
import and...
分类:
其他好文 时间:
2014-07-26 02:48:06
阅读次数:
236
今天讲解一下SpannableString和ImageSpan类
Bitmap bitmap = null;
bitmap = BitmapFactory.decodeResource(getResources(), imageIds[arg2 % imageIds.length]);
ImageSpan imageSpan = new ImageSpan(NeighborCommunica...
分类:
移动开发 时间:
2014-07-26 02:45:56
阅读次数:
230
一些手机管家软件可以显示当前系统内存使用了百分之多少,这个数字的得到是通过 取得总内存大小,减去可用内存大小,再与总大小做比值的结果,下面代码可以计算内存使用了多少。
/**
* 计算已使用内存的百分比
*
*/
public static String getUsedPercentValue(Context context) {
String dir = "/proc/mem...
分类:
移动开发 时间:
2014-07-26 02:44:26
阅读次数:
311
public class PxAndDp {
/**
* 根据手机的分辨率从 dp 的单位 转成为 px(像素)
*/
public static int dip2px(Context context, float dpValue) {
final float scale = context.getResources().getDisplayMetrics().density;
...
分类:
移动开发 时间:
2014-07-26 02:36:36
阅读次数:
276
1:然后我自己看了一下桌面图标的加载过程:
桌面第一次加载时是默认读取一个xml配置文件,完成配置工作。这个配置文件在Launcher目录下,
路径是:\Launcher\res\xml\default_workspace.xml 。这个XML文件就是刚升级,Launcher第
一次显示的时候,会读取的配置文件。default_workspace。xml里面可以配置APP快捷方式、Widge...
分类:
移动开发 时间:
2014-07-26 02:34:46
阅读次数:
251
原文:http://blog.csdn.net/newjueqi/article/details/19003775
做了接近两年app相关的系统架构,api设计,先后在两个创业公司中工作,经历过手机网页端,android客户端,iphone客户端,其中的乐与苦,得与失,仰首问天有谁知?我觉得是时候来个总结,把相关的技术和心得记录下来。
注:这系列文章谈到的经验是根据自身在小型创...
分类:
移动开发 时间:
2014-07-26 02:30:59
阅读次数:
310
收集了很多bitmap相关的处理方法,几乎全部应用在项目中,所以特记录下!
package com.tmacsky.utils;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import android.content.Context;
import android.content.res.Resourc...
分类:
移动开发 时间:
2014-07-26 02:30:06
阅读次数:
348
下面是HTC官方的一个图片,展示了Android系统从发布最终到用户手中的一个完整的过程:
Awesome Infographic: HTC Shows Us “The Anatomy of an Android OS Update” From PDK to OTA
Ever wonder what the entire process of an Android update...
分类:
移动开发 时间:
2014-07-26 02:25:06
阅读次数:
375