摘要:There are basically three logs on the system:Log:for short, textual datain-memory ringbuffer, fastephemeral (you'll lose it on a crash, or the ringbuffer scrolls)intended forapp developersEventLog is:for short, binary datain-memory ringbuffer, fastephemeral (you'll lose it on a crash, or the
阅读全文
摘要:从Android 2.3(API Level 9)开始,Android提供了一个程序性能诊断工具,它就是StrictMode。 目前,StrictMode的能力与限制包括: 1.基于线程的对磁盘读写,网络操作,以及自定义耗时操作等的监控; 2.基于VM进程的对对象泄露(Activity对象,SQLite对象,未反注册对象,未关闭对象)的监控; 3.可以检测到跨进程的耗时操作(当然必须是同步操作); 4.当前不支持在jni中发生的网络与磁盘操作。 随着Android的进化,StrictMode的功能也将越来越强大。 当StrictMode...
阅读全文
摘要:What Triggers ANR?In Android, application responsiveness is monitored by the Activity Manager and Window Manager system services. Android will display the ANR dialog for a particular application when it detects one of the following conditions:No response to an input event (e.g. key press, screen tou
阅读全文
摘要:Android从3.0(APILevel11)开始,在绘制View的时候支持硬件加速,充分利用GPU的特性,使得绘制更加平滑,但是会多消耗一些内存。开启或关闭硬件加速:由于硬件加速自身并非完美无缺,所以Android提供选项来打开或者关闭硬件加速,默认是关闭。可以在4个级别上打开或者关闭硬件加速:Application级别:<applicationandroid:hardwareAccelerated="true"...>Activity级别:<activityandroid:hardwareAccelerated="false"...
阅读全文
摘要:Tips and TricksSwitching to hardware accelerated 2D graphics can instantly increase performance, but you should still design your application to use the GPU effectively by following these recommendations:Reduce the number of views in your applicationThe more views the system has to draw, the slower
阅读全文
摘要:大多数Android设备都是触摸屏的,但是实际上Android设备也支持键盘操作,允许通过键盘来完成导航,点击,输入等。 当用户通过键盘(或者轨迹球)操作的时候,有必要聚焦当前接受输入的UI元素,例如,高亮(聚焦)某个按钮,让用户知道当前正在操作的UI元素是哪个。 但是,当用户使用触摸屏与设备交互的时候,始终聚焦当前UI元素就没有必要了,而且很丑陋;用户点击哪个元素,哪个元素就是当前元素,无需高亮标识。并且,通过触摸屏与设备交互的时候,点击某个UI元素也不会导致该元素聚焦,此时的高亮效果是由Pressed状态来完成的。也就是说,在Touch Mode模式之下,UI元素是不会进入聚...
阅读全文
摘要:在工作目录的最顶层运行命令: svn log--stop-on-copy 可以确定分支是在哪一个时间点创建的。
阅读全文