上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 26 下一页
摘要: 1 - java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory 添加包common-logging.jar2 - java.lang.ClassNotFoundException: javax.transaction.Synchronization 添加包jta.jar(hiberante)3 - java.lang.ClassNotFoundException: org.dom4j.DocumentException 添加包dom4j-1.6.1.jar4 - java.lang.Cl... 阅读全文
posted @ 2012-11-20 17:30 water0504 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 取昨天的日期,本想的截出来日期减一就好了。又一想不对,如果今天是一号怎么办?现有两个办法1:Date as = new Date(new Date().getTime()-24*60*60*1000); SimpleDateFormat matter1 = new SimpleDateFormat("yyyy-MM-dd"); String time = matter1.format(as); System.out.println(time); 取出数字型的时间 再减去24*60*60*1000,就得到昨天的时间了;这个有点过时了!2:Calendar cal = Cal. 阅读全文
posted @ 2012-11-20 17:28 water0504 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 1、编辑窗口右键单击——》Preferences——》General加号——》Editors加号——》点Text Editors字样——》右下窗口选Backgroud color,右边点掉System Default按钮,点Color右边的颜色框,选择颜色OK。我用的颜色R:191 G:220 U:192,感觉这个颜色对眼睛好2、编辑完成代码,用MyEclipse的代码格式化后,本来不长的代码也被自动转成了多行。虽然自动换行以后在编辑器中一眼就能看到全部的代码,但是可读性却大打折扣,避免出现这种情况的办法是:1.Java代码打开Eclipse的Window菜单,然后Preferences-&g 阅读全文
posted @ 2012-11-20 17:26 water0504 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 导读:获得用户之后,真正的战斗才刚打响,那就是留住用户,并通过他们最终获利。开发移动App 的童鞋,都会有这样一个问题:应用发出去了,就不可控了。用户手机上一堆的应用,有可能用户根本就忘记了我这个应用的存在,不怎么去使用,我有没有什么办法?我发布了新版本相信可以更吸引用户,但他也不知道啊;我想做个活动来激活用户更多地使用我的应用,怎么做到呢?提高活跃度的根本当然还在于产品本身,这一点是毋庸置疑的。正如有牛人总结说:互联网企业产品是唯一的核心。想必很多人了解,产品之外,运营也是非常重要的部分,甚至是更重要的部分。最近著名的移动应用统计供应商 Flurry 发表了一篇文章:移动应用经济的数学模型 阅读全文
posted @ 2012-10-30 11:49 water0504 阅读(243) 评论(0) 推荐(0) 编辑
摘要: WebView(网络视图)能加载显示网页,可以将其视为一个浏览器。它使用了WebKit渲染引擎加载显示网页,实现WebView有以下两种不同的方法:第一种方法的步骤:1.在要Activity中实例化WebView组件:WebView webView = new WebView(this);2.调用WebView的loadUrl()方法,设置WevView要显示的网页:互联网用:webView.loadUrl("http://www.google.com");本地文件用:webView.loadUrl("file:///android_asset/XX.html&q 阅读全文
posted @ 2012-10-30 10:29 water0504 阅读(228) 评论(0) 推荐(0) 编辑
摘要: public static final int ELAPSED_REALTIME //当系统进入睡眠状态时,这种类型的闹铃不会唤醒系统。直到系统下次被唤醒才传递它,该闹铃所用的时间是相对时间,是从系统启动后开始计时的,包括睡眠时间,可以通过调用SystemClock.elapsedRealtime()获得。系统值是3 (0x00000003)。 public static final int ELAPSED_REALTIME_WAKEUP //能唤醒系统,用法同ELAPSED_REALTIME,系统值是2 (0x00000002) 。 ... 阅读全文
posted @ 2012-10-29 18:40 water0504 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 计时的几种方法,在虚拟机中不会出现问题,但是在真机测试中,会遇到这样一种情况: 在手机进行休眠状态后,原来的睡60秒时间,大约变成了睡7分钟左右才再执行.这一直让我很不解,也没有发现代码上有什么问题.后来发现别人也遇到了类似的问题. 发现常见的应用中,如游戏,播放器以及控制灯光显示中,都会有这种情况,后来通过找了一个资料才知道如果要定时执行的话,要用AlarmManager,这是闹钟服务,Android手机中必须要保证AlarmManager的时钟跟真实时间同步的.所以在 Android手机休眠状态下,AlarmManager时间是不会变慢的. 以下介绍AlarmManager的基本使用.Al 阅读全文
posted @ 2012-10-29 18:38 water0504 阅读(1994) 评论(0) 推荐(0) 编辑
摘要: A PendingIntent itself is simply a reference to a token maintained by the system describing the original data used to retrieve it. This means that, even if its owning application’s process is killed, the PendingIntent itself will remain usable from other processes that have been given it. If the cre 阅读全文
posted @ 2012-10-29 18:33 water0504 阅读(201) 评论(0) 推荐(0) 编辑
摘要: getApplicationContext() 返回应用的上下文,生命周期是整个应用,应用摧毁它才摧毁Activity.this的context 返回当前activity的上下文,属于activity ,activity 摧毁他就摧毁getBaseContext() 返回由构造函数指定或setBaseContext()设置的上下文this.getApplicationContext()取的是这个应 用程序的Context,Activity.this取的是这个Activity的Context,这两者的生命周期是不同 的,前者的生命周期是整个应用,后者的生命周期只是它所在的Activity。 阅读全文
posted @ 2012-10-29 18:30 water0504 阅读(162) 评论(0) 推荐(0) 编辑
摘要: This question is over a year old and is definitely long and complicated and the English language is difficult to understand. However, it still probably deserves some kind of answer.If I understand, you are basically asking for the difference between the different AndroidContextobjects. The main diff 阅读全文
posted @ 2012-10-29 17:47 water0504 阅读(1845) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 26 下一页