- 博客(2)
- 资源 (13)
- 收藏
- 关注
原创 Loki的SingletonHolder解析
不得不说说Loki这个库还是相当厉害的,采用模板的方式实现了很多的设计模式,例如单体模式、策略模式、访问者模式、工厂模式等。下面从Loki库入门的设计模式介绍一下, Loki的单体模板类设计的非常强大,通过策略模式将单体的各个组件给模块化了,非常厉害,如下: template typename T, template class Creat
2014-03-31 16:45:42 2303
android自动短信发送源码
用来学习短信模块的绝佳代码!
public class ListAdapter extends BaseAdapter {
private LayoutInflater mInflater;
private List<Map<String, Object>> mData;
public static Map<Integer, Boolean> isSelected;
SMSINFODao smsinfodao;
public ListAdapter(Context context) {
mInflater = LayoutInflater.from(context);
init(context);
}
//初始化
private void init(Context context) {
mData=new ArrayList<Map<String, Object>>();
smsinfodao = new SMSINFODao(context);
Cursor cursor = smsinfodao.select();
while (cursor.moveToNext()) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("img", android.R.drawable.ic_dialog_email);
map.put("pn", cursor.getString(0));
map.put("title", cursor.getString(1));
map.put("body", cursor.getString(2));
mData.add(map);
}
2013-04-26
独立的键盘钩子,用来hook键盘的一个小程序,很值得看看
这个程序是用来hook键盘的,而且是一个全局hook,但是程序并没有用全局的,所以是个不错的程序,这个程序是在console台下运行的,你也可以改写该代码
2009-12-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人