Skip to content

Commit fd80757

Browse files
author
fengjian
committed
add $optimizeBackgroundOverdraw to ActivityLess
1 parent 39fb335 commit fd80757

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

lesscode-core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: 'com.jfrog.bintray'
44

5-
version = "0.8.7" // #CONFIG# // project version
5+
version = "0.8.8" // #CONFIG# // project version
66

77
android {
88
compileSdkVersion 23

lesscode-core/src/main/java/com/jayfeng/lesscode/core/ActivityLess.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,13 @@ public class ActivityLess {
6060
return true;
6161
}
6262
}
63+
64+
/**
65+
* 优化activity的背景过度绘制
66+
* 在合适的时候调用,建议放在super.onCreate(saveInstanceState)代码下面一行
67+
* @param activity
68+
*/
69+
public static void $optimizeBackgroundOverdraw(Activity activity) {
70+
activity.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
71+
}
6372
}

0 commit comments

Comments
 (0)