摘要:
谈到广播,必然会联想到观察者模式 注册广播就相当于主题的registerObserver 取消广播就相当于主题的removeObserver 发送广播就相当于主题的notifyObserver 接收广播就相当于观察者的update 至于什么是观察者模式,这篇文章写得很好啊:http://blog.c 阅读全文
摘要:
方式一:加载简单的文本注意:ListView也是一个控件,所以像button一样加载即可,它不能直接接受数组数据,而是要通过一个适配器Adapter,常用ArrayAdapter 1 public class MainActivity extends Activity { 2 3 @Ove... 阅读全文
摘要:
生命周期:原:http://blog.csdn.net/w709835509/article/details/7655240 1 import android.app.Activity; 2 import android.os.Bundle; 3 4 public class MainActivi... 阅读全文