This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--CNZZ--> | |
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan style='display:none;' id='cnzz_stat_icon_1260545070'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s95.cnzz.com/z_stat.php%3Fid%3D1260545070' type='text/javascript'%3E%3C/script%3E"));</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#文件保存为utf8编码 且需要添加下一行代码 | |
#coding=utf-8 | |
import sys | |
from com.android.monkeyrunner import MonkeyRunner as mr | |
from com.android.monkeyrunner import MonkeyDevice as md | |
from com.android.monkeyrunner import MonkeyImage as mi | |
# 亲测LG G3手机运行没问题 切换为其他手机 需要调整代码中点击的位置 | |
#connect device 连接设备 | |
device = mr.waitForConnection(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Created by Storm Zhang 2014-8-24. | |
*/ | |
package com.storm.library; | |
import android.app.Activity; | |
import android.content.res.Resources; | |
import android.view.View; | |
import android.view.View.OnClickListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Modify this with your IP range | |
MY_IP_RANGE="192\.168\.1" | |
#You usually wouldn't have to modify this | |
PORT_BASE=5555 | |
#List the devices on the screen for your viewing pleasure | |
adb devices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.xiaopan.android.widget; | |
import java.lang.reflect.Field; | |
import android.content.Context; | |
import android.util.Log; | |
import android.view.Gravity; | |
import android.view.View; | |
import android.view.View.OnClickListener; | |
import android.view.ViewGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2013 Peng fei Pan <sky@xiaopan.me> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.xiaopan.android.util; | |
import java.io.ByteArrayInputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2013 Peng fei Pan <sky@xiaopan.me> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Bitmap combineImages(Bitmap bgd, Bitmap fg) { | |
Bitmap bmp; | |
int width = bgd.getWidth() > fg.getWidth() ? | |
bgd.getWidth() : fg.getWidth(); | |
int height = bgd.getHeight() > fg.getHeight() ? | |
bgd.getHeight() : fg.getHeight(); | |
bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); | |
Paint paint = new Paint(); |
NewerOlder