- 博客(4)
- 资源 (1)
- 收藏
- 关注
转载 Android之ExpandableListView的属性(Group不展开)
1. 设置ExpandableListView 默认是展开的: 先实例化exListView 然后 exListView.setAdapter(exlvAdapter); //遍历所有group,将所有项设置成默认展开 intgroupCount = exListView.getCount(); for (inti=0; i<groupCount; i++) {
2015-10-28 18:05:14 427
原创 System.currentTimeMillis()计算方式与时间的单位转换
一、时间的单位转换 1秒=1000毫秒(ms) 1毫秒=1/1,000秒(s)1秒=1,000,000 微秒(μs) 1微秒=1/1,000,000秒(s)1秒=1,000,000,000 纳秒(ns) 1纳秒=1/1,000,000,000秒(s)1秒=1,000,000,000,000 皮秒(ps) 1皮秒=1/1,000,000,000,000秒(s)1分钟=60秒
2015-10-23 16:40:51 577
原创 Android中的“再按一次返回键退出程序”实现
private long exitTime = 0;@Overridepublic boolean onKeyDown(int keyCode, KeyEvent event) {if(keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN){if((System.currentTimeM
2015-10-23 15:56:24 317
原创 项目1问题
1、List和Json相互转化 因为要保存List集合到SharedPreferences,而SharedPreferences只能存放基本类型,所以要把List集合转化为Json字符串 new Gson().toJson( List集合对象 )//List转Json new Gson().fromJson( json字符串, new
2015-10-23 15:28:16 462
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人