`
文章列表
转自http://blog.csdn.net/wutianyin222/article/details/8853958 System.currentTimeMillis()  系统时间,也就是日期时间,可以被系统设置修改,然后值就会发生跳变。 uptimeMillis 自开机后,经过的时间,不包括深度睡眠的时间 elapsedRealtime自开机后,经过的时间,包括深度睡眠的时间 所以System.currentTimeMillis()不适合计算时间间隔,eg, now = System.currentTimeMillis() //do something... duratio ...
//modify by hyxu 2015-9-30 to support above 19 version public void change(boolean closeOrOpen) { if (Build.VERSION.SDK_INT <19) { Secure.setLocationProviderEnabled(mContext.getContentResolver(), LocationManager.GPS_PROVIDER, closeOrOpen); }else{ if(!closeOrOpen){ Settings.Sec ...
http://developer.android.com/reference/android/content/BroadcastReceiver.PendingResult.html State for a result that is pending for a broadcast receiver. Returned by goAsync() while in BroadcastReceiver.onReceive(). This allows you to return from onReceive() without having the broadcast terminate; you ...
public class YesNoDialog extends DialogFragment { public YesNoDialog() { } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { Bundle args = getArguments(); String title = args.getString("title", ""); St ...

git log

    博客分类:
  • git
从今天开始学习git, 并做笔记方便忘记时复习 http://git-scm.com/book/zh/v2/Git-%E5%9F%BA%E7%A1%80-%E6%9F%A5%E7%9C%8B%E6%8F%90%E4%BA%A4%E5%8E%86%E5%8F%B2 Table 2-3. 限制 git log 输出的选项 选项 说明 -(n)  仅显示最近的 n 条提交 --since, --after  仅显示指定时间之后的提交。 --until, --before 仅显示指定时间之前的提交。 --author  仅显示指定作者相关的提交。 --committer 仅显示指定提交 ...
转自http://blog.csdn.net/hitlion2008/article/details/7983449
转自http://www.cnblogs.com/zgz345/archive/2013/03/04/2942553.html 今天使用Fragment的时候,出现了这个错误 IllegalStateException: Can not perform this action after onSaveInstanceState:     E/AndroidRuntime(12747): Caused by: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState    ...
转自http://www.cnblogs.com/whitewolf/p/3999773.html ndroid在设计View类时,为了能储存一些辅助信息,设计一个一个setTag/getTag的方法。这让我想起在Winform设计中每个Control同样存在一个Tag。 今天要说的是我最近学习android遇见的setTag的坑。一般情况下我们只需要使用唯一参数的setTag方法。但有时我们需要存储多个数据,所以这个时候我们就需要使用带key的重载。 文档是描述:“ The specified key should be an id declared in the resources o ...
转自http://blog.csdn.net/a396901990/article/details/40153759 本文主要介绍Android L新增加的两个UI控件RecyclerView,CardView的导入和使用。 RecyclerView是ListView的升级版 CardView则是Google提供的一个卡片式视图组件 本例就是使用RecyclerView来展示多个CardView的一个小例子,先看下效果图:
转自[url] http://javatechig.com/android/creating-a-background-service-in-android[/url] 1. What is IntentService? IntentService is a subclass of android.app.Service class. A stated intent service allows to handle long running tasks without effecting the application UI thread. This is not bound to any ...
转自http://www.linuxidc.com/Linux/2015-03/114754.htm 系统媒体库不了解的线看这儿:     Android media媒体库分析之:MediaProvider http://www.linuxidc.com/Linux/2015-03/114755.htm     Android media媒体库分析之:调用系统媒体库完成指定媒体文件扫描 http://www.linuxidc.com/Linux/2015-03/114756.htm 先看一下要实现的效果: 上图是系统设置中分类别对文件所占空间的统计,项目中要统计媒体文件所占空间,于 ...
转自:http://www.2cto.com/kf/201507/414802.html Android L[Android5.X.X] 版本通过Intent隐式启动service时将会报出以下错误: AndroidRuntime( 792): java.lang.IllegalArgumentException: Service Intent must be explicit B .分析过程 上面源码中蓝色加粗部分:service.getComponent() == null && service.getPackage() == null 表明通过int ...
http://possiblemobile.com/2013/06/context/ Application Activity Service ContentProvider BroadcastReceiver Show a Dialog NO YES NO NO NO Start an Activity NO1 YES NO1 NO1 NO1 Layout Inflation NO2 YES NO2 NO2 NO2 Start a Service YES YES YES YES YES Bind to a Service YES YES YES YES NO Send a Broadcas ...
关于ContentProviderOperation.Builder 中withValue和withValueBackReference的区别终于在stackoverflow上找到了非常完美的解释: http://stackoverflow.com/questions/4655291/semantics-of-withvaluebackreference 自己理解的是:如果我们一次只单独操作一个table,只需要使用withValue,如果一次操作两个有关联的表则需要使用withValueBackReference,比如stackoverflow中举例,一个Foo拥有bar,插入Foo时同时将 ...
转自: 1,http://www.sharejs.com/codes/objectc/5882 2,https://github.com/SuiFeng/NSSetUncaughtExceptionHandler 3,http://stackoverflow.com/questions/1128539/nssetuncaughtexceptionhandler-not-catch-all-errors-on-iphone 附件为例子
Global site tag (gtag.js) - Google Analytics