getCacheDir用法

摘要: 注: 在Activity中有 getFileDir() 和 getCacheDir(); 方法可以获得当前的手机自带的存储空间中的当前包文件的路径 getFileDir() ----- /data/data/cn.xxx.xxx(当前包)/files getCacheDir() ----- /data/data/cn.xxx.xxx(当前包)/cache 1.编写文件读取与写入功能实现类FileService packagecn.android.service; importjava.io.ByteArrayOutputStream; importjava.io.FileInputStream 阅读全文
posted @ 2012-04-21 18:25 jiezzy 阅读(7900) 评论(1) 推荐(0)

LayoutInflater获取方式

摘要: 获得 LayoutInflater 实例的三种方式1.LayoutInflater inflater = getLayoutInflater(); //调用Activity的getLayoutInflater()2.LayoutInflater localinflater =(LayoutInflater)context.getSystemService (Context.LAYOUT_INFLATER_SERVICE);3. LayoutInflater inflater = LayoutInflater.from(context); 阅读全文
posted @ 2012-04-21 18:02 jiezzy 阅读(238) 评论(0) 推荐(0)

android 解析json数据格式

摘要: json数据格式解析我自己分为两种;一种是普通的,一种是带有数组形式的;普通形式的:服务器端返回的json数据格式如下:{"userbean":{"Uid":"100196","Showname":"\u75af\u72c2\u7684\u7334\u5b50","Avtar":null,"State":1}}分析代码如下://TODO状态处理500200intres=0;res=httpClient.execute(httpPost).getStatus 阅读全文
posted @ 2012-04-21 17:54 jiezzy 阅读(240) 评论(0) 推荐(0)

android开发参考网站

摘要: 论坛:1.http://www.eoeandroid.com/2.http://hiapk.com/3.http://www.javaeye.com/forums/tag/Android4.http://www.android123.com.cn/yuanmaxiazai/564.html5.http://dev.10086.cn/cmdn/bbs/thread-21365-1-1.html6.http://www.chinaup.org/bbs/7.http://mdev.cc/dev/thread.php?fid-9.html8.http://www.in189.com/9.http:// 阅读全文
posted @ 2012-04-21 17:49 jiezzy 阅读(299) 评论(0) 推荐(0)

在Android中使用Handler和Thread线程

摘要: 大家都知道,在PC上的应用程序当需要进行一些复杂的数据操作,但不需要界面UI的时候,我们会为应用程序专门写一个线程去执行这些复杂的数据操作。通过线程,可以执行例如:数据处理、数据下载等比较耗时的操作,同时对用户的界面不会产生影响。在Android应用程序开发中,同样会遇到这样的问题。当我们需要访问网络,从网上下载数据并显示在我们的UI上时,就会启动后台线程去下载数据,下载线程执行完成后将结果返回给主用户界面线程。 对于线程的控制,我们将介绍一个Handler类,使用该类可以对运行在不同线程中的多个任务进行排队,并使用Message和Runnable对象安排这些任务。在javadoc中,对Ha. 阅读全文
posted @ 2012-04-21 13:38 jiezzy 阅读(514) 评论(0) 推荐(0)