Skip to content

Instantly share code, notes, and snippets.

Avatar
:bowtie:
Coding

书虫 Logan676

:bowtie:
Coding
View GitHub Profile
@pyricau
pyricau / IMMLeaks.java
Last active Oct 24, 2020
"Fix" for InputMethodManager leaking the last focused view: https://code.google.com/p/android/issues/detail?id=171190
View IMMLeaks.java
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.ContextWrapper;
import android.os.Bundle;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.Log;
import android.view.View;
import android.view.ViewTreeObserver;
@Frank-Zhu
Frank-Zhu / HttpClientSslHelper.java
Last active Sep 28, 2020
Android HTTPS SSL双向验证
View HttpClientSslHelper.java
package com.ecloud.ssldemo;
import android.content.Context;
import android.util.Log;
import com.squareup.okhttp.OkHttpClient;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.conn.scheme.Scheme;
@dmarcato
dmarcato / strip_play_services.gradle
Last active Dec 2, 2020
Gradle task to strip unused packages on Google Play Services library
View strip_play_services.gradle
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
@staltz
staltz / introrx.md
Last active Dec 5, 2020
The introduction to Reactive Programming you've been missing
View introrx.md
@border
border / proguard-android.txt
Created Oct 29, 2013
proguard for android
View proguard-android.txt
-optimizationpasses 5 # 指定代码的压缩级别
-dontusemixedcaseclassnames # 是否使用大小写混合
-dontskipnonpubliclibraryclasses # 是否混淆第三方jar
-dontpreverify # 混淆时是否做预校验
-keepattributes SourceFile,LineNumberTable # 混淆号错误信息里带上代码行
-verbose # 混淆时是否记录日志
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* # 混淆时所采用的算法
-libraryjars libs/android_api.jar
-libraryjars libs/baidumapapi_v2_2_0.jar
You can’t perform that action at this time.