Skip to content

Instantly share code, notes, and snippets.

View fantouch's full-sized avatar

fantouch fantouch

  • Tencent
  • Shenzhen
View GitHub Profile
@fantouch
fantouch / .java
Last active December 17, 2015 01:09
获取当前线程的StackTrace
// 获取当前线程的StackTrace
StackTraceElement[] elements = Thread.currentThread().getStackTrace();
@fantouch
fantouch / me.fantouch.libs
Created May 6, 2013 16:30
Welcome document
me.fantouch.libs
================
###[查看Demo](https://github.com/fantouch/me.fantouch.Demo)
**Android Library 工程,帮助更便捷地进行 Android 开发,含有以下模块:**
* [CrashHandler 崩溃处理器](https://github.com/fantouch/me.fantouch.libs/blob/master/README.md#crashhandler)
* [Logg 日志工具](https://github.com/fantouch/me.fantouch.libs/blob/master/README.md#logg)
* [UpdateHelper App自动更新助手](https://github.com/fantouch/me.fantouch.libs/blob/master/README.md#updatehelper)
* [AbsSendReportsService 文件后台发送服务](https://github.com/fantouch/me.fantouch.libs/blob/master/README.md#abssendreportsservice)
@fantouch
fantouch / me.fantouch.libs.md
Last active December 17, 2015 01:09
me.fantouch.libs.md

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

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

  • 按Cmmd+,打开Eclipse的设置界面
  • 添加文件扩展名*.png,添加对应的编辑器为Android Draw 9-patch,并设置成默认.
    [![][3]][3]
@fantouch
fantouch / 0_reuse_code.js
Last active August 29, 2015 14:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console