Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fantouch/6071713 to your computer and use it in GitHub Desktop.
Save fantouch/6071713 to your computer and use it in GitHub Desktop.

升级Android SDK Tool 升级到v22后,意外发现ADT为Eclipse增加了9.png编辑器:

这下方便多了,双击资源文件夹里面的9.png图片就可以直接在Eclipse里面编辑.
有没有办法把.png文件也关联到这个默认的9.png编辑器呢?
那样就省去每次在外部制作,然后拖回工程里面替换的痛苦了. Google一下,答案好简单.

  • 按Cmmd+,打开Eclipse的设置界面
  • 添加文件扩展名*.png,添加对应的编辑器为Android Draw 9-patch,并设置成默认.

打开Android Draw 9-patch编辑器后,发现多了一个新功能,就是按住Ctrl键可以Draw layout bounds

搜了一下,找到一个解释:
http://stackoverflow.com/questions/11406521/android-9-patch-tool-what-is-the-new-layout-bounds-feature
大意就是说,这是一个尚未正式发布的功能,所以官方文档也没有相应记录.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment