摘要:
在window的Preferences中的Java->Code Style->Formatter到了这一步就是找到Ctrl+Shift+F的格式化模板了,这里不能直接修改。因为是eclipse默认的模板,是只读的。我们可以new 一个Formatter,然后点击edit就可以修改模板。我修改模板主要就是修改那个Ctrl+Shift+F后,把我的代码换多行了。修改选项卡中的Line Wrapping选项卡, 有一个Maximum line with: 80(默认);这里默认是80我们可以把它修改成120的,那样不超过120个字符就不会被换行了!其他自己需要的格式都可以在这里面修改。当 阅读全文
posted @ 2014-01-10 16:05
似水流云
阅读(343)
评论(0)
推荐(0)
摘要:
obtainmessage()是从消息池中拿来一个msg 不需要另开辟空间newnew需要重新申请,效率低,obtianmessage可以循环利用;//use Handler.obtainMessage(),instead of msg = new Message();//because if there is already an Message object,that not be used by //any one ,the system will hand use that object,so you don't have to //create and object and 阅读全文
posted @ 2014-01-10 16:04
似水流云
阅读(372)
评论(0)
推荐(0)