Skip to content

Instantly share code, notes, and snippets.

View wutianlong's full-sized avatar

Superman wutianlong

View GitHub Profile
@wutianlong
wutianlong / adb+
Last active February 1, 2016 02:56 — forked from race604/adb+
同时为多台设备安装apk文件
#!/bin/bash
# Script adb+
# Run any command adb provides on all your currently connected devices,
# Or prompt to select one device
showHelp() {
echo "Usage: adb+ [-a] <command>"
echo " -h: show help"
echo " -a: run command on all device"
echo " command: normal adb commands"
@wutianlong
wutianlong / gist:7412f7334afd1eae4c67
Last active February 1, 2016 02:57 — forked from kyze8439690/gist:5bafc99a65a0f4298db3
发布apk之前需要做的事情
1.debug false
2.sign true
3.test proguard
4.change version code
5.upload new apk to umeng and test update works
6.merge master to release branch
7.upload new apk to appstores
@wutianlong
wutianlong / TextEllipse.java
Last active February 1, 2016 02:59
设置TextView最多显示多少行string
public static void makeEllipseEnd(TextView textView, String str, int maxLine) {
textView.setText(str);
textView.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
textView.getViewTreeObserver().removeOnPreDrawListener(this);
if (textView.getLineCount() > maxLine) {
int offset = textView.getLayout().getLineEnd(maxLine - 1);
String text = textView.getText().subSequence(0, offset).toString();
if (text.endsWith("\n")) {