博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  android 笔记

android学习笔记。包括文档翻译和技术点总结
摘要:19 down vote It's kind of difficult to find documentation about this, so I will collect here all information I have found. If you are in a rush or just don't like to read, jump to the How to get data from a SMS section.content://mms-sms/conversationsThis is the URI of the Mms and SMS provide 阅读全文

posted @ 2011-12-26 21:00 qzxia 阅读(727) 评论(0) 推荐(0)

摘要:Creating Struts2 application on Google App Engine(GAE)AUGUST 30, 2009BYWHYJAVA59 COMMENTSWhy i am writing this blog?I faced lot of problems while creating my first application using Struts 2 on Google App Engine . So i decided to write a blog detailing how developers can create their application on 阅读全文

posted @ 2011-01-12 23:44 qzxia 阅读(411) 评论(0) 推荐(0)

摘要:In tutorial #4.1, I mentioned that we passed custom attributes for the text and image variables from the XML resource file to our custom class. This is a critical skill for performing true object-oriented programming and how to do it wasn’t obvious from Google’s Android API Demos.Luckily I was point 阅读全文

posted @ 2011-01-12 14:52 qzxia 阅读(813) 评论(0) 推荐(0)

摘要:要实现添加按钮的操作,必须自定义Adapter,使用Button View的setTag()方法,将Button所属的位置设置到tag当中要实现动态添加删除ItemView的操作,必须首先调整调整Adapter所绑定的数据源,然后调用Adapter的notifyDataSetChanged()方法以下为实现的一个实例 阅读全文

posted @ 2010-11-29 12:47 qzxia 阅读(20897) 评论(5) 推荐(1)

摘要:If you start an android Service with startService(..) that Service will remain running until you explicitly invoke stopService(..). There are two reasons that a service can be run by the system. If so... 阅读全文

posted @ 2010-11-19 12:34 qzxia 阅读(1179) 评论(0) 推荐(0)

摘要:I have two Activities A and B. I want to have the shrink Animation when Activity A calls B and maximize animation when Activity B calls A. I don't need the animation xml files for this.When we call an... 阅读全文

posted @ 2010-11-10 13:37 qzxia 阅读(412) 评论(0) 推荐(0)

摘要:Android的Adapter是连接后端数据和前端显示的适配器接口,他有多种抽象类,在使用Gallery时候,我们继承的BaseAdapter就是他的一个子类.要实现BaseAdapter这个子类,我们要实现它的四个方法,public int getCount()public Object getItem(int position)public long getItemId(int positio... 阅读全文

posted @ 2010-10-25 17:57 qzxia 阅读(6535) 评论(3) 推荐(0)

摘要:在使用ListActivity的时候会遇到使用android默认ID名称的时候,例如 @android:id/list我们在新建一个资源的时候,我们需要给这个资源附一个ID,例如 @+id/textName我们在引用一个资源的时候,需要提供他的ID,例如@style/font1在这里总结一下ID的使用方法新建一个资源,资源的ID规则如下 @+id/资源ID引用自己定义的资源,ziyuanID规则如... 阅读全文

posted @ 2010-08-25 14:38 qzxia 阅读(1189) 评论(0) 推荐(0)

摘要:最近在看android开发文档中关于Junit测试一部分的内容,发现按照他的介绍来做,是有问题的,异常如下Test run failed: No test results后来发现开发文档中少了一个默认构造函数,导致了这个问题。加一个默认构造函数即可,代码如下 阅读全文

posted @ 2010-08-23 17:25 qzxia 阅读(5479) 评论(0) 推荐(0)

摘要:最近需要一个倒数计时器,要求实现倒数计时,暂停,继续,和快进快退的功能。Android本身提供了一个CountdownTimer的类,采用Handler的方式实现,但是只提供了倒数计时的功能,对于暂停,继续,快进快退功能未提供支持,于是在CounterDownTimer的基础上重写了一个类,最终满足要求。 阅读全文

posted @ 2010-08-21 10:45 qzxia 阅读(1359) 评论(0) 推荐(0)

摘要:在Andriod中关于线程一部分中经常会遇到计算时间的操作,这里面应用较多的是SystemClock类,这个类有两个主要的静态方法uptimeMillis()和elapsedRealtime().我们来看一下这两个函数的实际含义,以下是源码中的注释  Returns milliseconds since boot, not counting time spent in deep sleep.  ... 阅读全文

posted @ 2010-08-20 13:52 qzxia 阅读(4220) 评论(0) 推荐(0)