Android监听器(3)
来源:未知 责任编辑:责任编辑 发表时间:2015-09-16 20:03 点击:次
Cursor cursor = resolver.query(uri, new String[] { "date", "address", "body" }, null, null, "_id desc limit 1");
if (cursor.moveToNext()) {
long ms = cursor.getLong(0);
String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(ms));
String address = cursor.getString(1);
String body = cursor.getString(2);
System.out.println(date + " " + address + " " + body);
}
}
}
作者“傅荣康专栏”
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>