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
import android.os.Handler; | |
import android.os.Message; | |
/** | |
* 自定义的倒计时类,没有用官方提供的CountDownTimer来实现.有暂停等方法,灵活性强. | |
* 在activity退出后还会持续计时,所以结束时需要判断当前activity是否在前台<br> | |
* | |
* @author kale | |
* @date 2015/4/24 | |
* @see "http://www.cnblogs.com/tianzhijiexian/p/4459216.html" |
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 class HttpManager { | |
private static final String TAG = "HttpManager"; | |
private static HttpManager mInstance = null; | |
private OkHttpClient httpClient; | |
public static HttpManager getInstance() { | |
if (mInstance == null) { |
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
;------------ For Double RAlt ----------- | |
#Persistent | |
$RAlt:: | |
if key_presses > 0 | |
{ | |
key_presses += 1 | |
return |
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
;------------- 切换标签栏 -------------- | |
^WheelLeft:: | |
SendInput ^{tab} | |
sleep ,200 | |
return | |
^WheelRight:: | |
SendInput ^+{tab} | |
sleep ,200 |
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
^+WheelUp:: | |
SendInput ^#{Right} | |
sleep ,200 | |
return | |
#if GetKeyState("LShift", "p") | |
LAlt & i:: Send {WheelUp} | |
LAlt & k:: Send {WheelDown} |
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 static void lengthChineseFilter(final EditText editText, final int length) { | |
InputFilter[] filters = new InputFilter[1]; | |
filters[0] = new InputFilter.LengthFilter(length) { | |
public CharSequence filter(@NonNull CharSequence source, int start, int end, @NonNull Spanned dest, int dstart, int dend) { | |
// 可以检查中文字符 | |
boolean isChinese = CharacterUtil.checkNameChese(source.toString()); |
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 static void lengthChineseFilter(final EditText editText, final int length) { | |
InputFilter[] filters = new InputFilter[1]; | |
filters[0] = new InputFilter.LengthFilter(length) { | |
public CharSequence filter(@NonNull CharSequence source, int start, int end, @NonNull Spanned dest, int dstart, int dend) { | |
// 可以检查中文字符 | |
boolean isChinese = CharacterUtil.checkNameChese(source.toString()); |