Skip to content

Instantly share code, notes, and snippets.

View miao1007's full-sized avatar
🖥️
Free at night on work day.

みゃお miao1007

🖥️
Free at night on work day.
  • Huawei Technologies Co., Ltd.
  • ShenZhen, China
View GitHub Profile
@miao1007
miao1007 / build.gradle
Created May 18, 2015 12:30
Square proguard
buildTypes {
release {
minifyEnabled true //run proguard
shrinkResources true
proguardFile 'proguard-square.pro'
// Default proguard files(including support libs)
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
@miao1007
miao1007 / FlyMeUtils.java
Last active October 31, 2015 11:02
flyme 魅族 状态栏适配 translucent
public class FlyMeUtils {
/**
* setDarkStatusBar on FlyMe
* 设置状态栏字体为暗色 仅魅族有效
*/
public static void setDarkStatusBar(Activity activity, boolean isDark) {
WindowManager.LayoutParams lp = activity.getWindow().getAttributes();
try {
Class<?> instance = Class.forName("android.view.WindowManager$LayoutParams");
@miao1007
miao1007 / GradientTransformation.java
Last active October 7, 2023 05:10
Gradient Transformation For Picasso
/**
* Created by Miao1007 on 2/2/15.
*
* Original Code: https://gist.github.com/miao1007/3f7e9b5f011fc188eba6
*/
public class GradientTransformation implements Transformation {
int startColor = Color.argb(240,0,0,0);
int endColor = Color.TRANSPARENT;