├── settings.gradle ├── blurry ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── jp │ │ └── wasabeef │ │ └── blurry │ │ ├── BlurFactor.java │ │ ├── Helper.java │ │ ├── BlurTask.java │ │ ├── Blurry.java │ │ └── Blur.java ├── proguard-rules.txt └── build.gradle ├── art ├── blurry.gif └── blurry.png ├── example ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── dimens.xml │ │ │ └── styles.xml │ │ ├── drawable-xxhdpi │ │ │ └── demo.jpg │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ └── layout │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── jp │ │ └── wasabeef │ │ └── example │ │ └── blurry │ │ └── MainActivity.kt ├── proguard-rules.pro └── build.gradle ├── signingConfigs ├── debug.keystore └── debug.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE.md └── FUNDING.yml ├── .idea ├── encodings.xml ├── codeStyles │ ├── codeStyleConfig.xml │ └── Project.xml ├── vcs.xml └── inspectionProfiles │ └── Project_Default.xml ├── .editorconfig ├── gradle.properties ├── .gitignore ├── gradlew.bat ├── README.md ├── CHANGELOG.md ├── gradlew └── LICENSE /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':blurry', ':example' 2 | -------------------------------------------------------------------------------- /blurry/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /art/blurry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluesky950520/Blurry-edit/HEAD/art/blurry.gif -------------------------------------------------------------------------------- /art/blurry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluesky950520/Blurry-edit/HEAD/art/blurry.png -------------------------------------------------------------------------------- /blurry/proguard-rules.txt: -------------------------------------------------------------------------------- 1 | -keepclasseswithmembernames class * { 2 | native ; 3 | } 4 | -------------------------------------------------------------------------------- /example/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Blurry 3 | 4 | -------------------------------------------------------------------------------- /signingConfigs/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluesky950520/Blurry-edit/HEAD/signingConfigs/debug.keystore -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluesky950520/Blurry-edit/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/demo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluesky950520/Blurry-edit/HEAD/example/src/main/res/drawable-xxhdpi/demo.jpg -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## What does this change? 2 | 3 | ## What is the value of this and can you measure success? 4 | 5 | ## Screenshots 6 | 7 | -------------------------------------------------------------------------------- /example/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluesky950520/Blurry-edit/HEAD/example/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluesky950520/Blurry-edit/HEAD/example/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluesky950520/Blurry-edit/HEAD/example/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluesky950520/Blurry-edit/HEAD/example/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = space 7 | insert_final_newline = false 8 | max_line_length = 100 9 | indent_size = 2 10 | tab_width = 2 11 | -------------------------------------------------------------------------------- /example/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 2 | org.gradle.parallel=true 3 | org.gradle.daemon=true 4 | org.gradle.configureondemand=true 5 | org.gradle.caching=true 6 | android.useAndroidX=true 7 | android.enableJetifier=false 8 | android.enableR8.fullMode=true 9 | 10 | VERSION_NAME=4.0.1 11 | VERSION_CODE=401 12 | 13 | COMPILE_SDK_VERSION=30 14 | TARGET_SDK_VERSION=30 15 | MIN_SDK_VERSION=21 -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Future Task 2 | 3 | ## What is the motivation? 4 | 5 | ## What kind of solution can be considered? 6 | 7 | ## What do you want to discuss? 8 | 9 | *Please add relevant labels* 10 | 11 | ----- 12 | 13 | # Bug Reporting 14 | 15 | ## Steps to Reproduce 16 | 17 | ## Actual Results (include screenshots) 18 | 19 | ## Expected Results (include screenshots) 20 | 21 | ## URL 22 | 23 | ## OS details 24 | 25 | - Device: 26 | - OS: 27 | 28 | *Please add relevant labels* 29 | -------------------------------------------------------------------------------- /signingConfigs/debug.gradle: -------------------------------------------------------------------------------- 1 | signingConfigs { 2 | debug { 3 | storeFile file("debug.keystore") 4 | storePassword "android" 5 | keyAlias "androiddebugkey" 6 | keyPassword "android" 7 | } 8 | } 9 | 10 | // $ keytool -v -list -keystore 11 | // Certificate fingerprints: 12 | // MD5: 28:22:7C:A4:B9:2F:6E:C7:D5:58:62:48:EB:7E:82:C3 13 | // SHA1: 94:25:A9:50:9C:0E:AE:AA:00:37:5E:D6:71:E3:BC:ED:17:E5:0C:A3 14 | // SHA256: 04:92:39:09:3D:1C:B6:16:BE:55:58:A3:5F:3B:BB:CB:0B:E7:F1:DA:AA:26:C5:2D:BD:2F:44:CF:AE:47:CF:87 15 | -------------------------------------------------------------------------------- /example/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Applications/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: wasabeef # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /example/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | -------------------------------------------------------------------------------- /example/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-kapt' 4 | 5 | android { 6 | compileSdkVersion COMPILE_SDK_VERSION as int 7 | 8 | defaultConfig { 9 | minSdkVersion MIN_SDK_VERSION as int 10 | targetSdkVersion TARGET_SDK_VERSION as int 11 | versionCode VERSION_CODE as int 12 | versionName VERSION_NAME 13 | } 14 | 15 | // SigningConfigs 16 | apply from: '../signingConfigs/debug.gradle', to: android 17 | 18 | buildTypes { 19 | debug { 20 | debuggable true 21 | signingConfig signingConfigs.debug 22 | } 23 | release { 24 | debuggable false 25 | zipAlignEnabled true 26 | minifyEnabled true 27 | shrinkResources true 28 | } 29 | } 30 | } 31 | 32 | repositories { 33 | // maven { url = "https://oss.sonatype.org/content/repositories/snapshots"} 34 | } 35 | 36 | dependencies { 37 | implementation project(':blurry') 38 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 39 | implementation "androidx.appcompat:appcompat:1.2.0" 40 | } 41 | -------------------------------------------------------------------------------- /blurry/src/main/java/jp/wasabeef/blurry/BlurFactor.java: -------------------------------------------------------------------------------- 1 | package jp.wasabeef.blurry; 2 | 3 | import android.graphics.Color; 4 | 5 | /** 6 | * Copyright (C) 2020 Wasabeef 7 | *

8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | *

12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | *

14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | class BlurFactor { 22 | 23 | public static final int DEFAULT_RADIUS = 25; 24 | public static final int DEFAULT_SAMPLING = 1; 25 | 26 | public int width; 27 | public int height; 28 | public int radius = DEFAULT_RADIUS; 29 | public int sampling = DEFAULT_SAMPLING; 30 | public int color = Color.TRANSPARENT; 31 | } 32 | -------------------------------------------------------------------------------- /blurry/src/main/java/jp/wasabeef/blurry/Helper.java: -------------------------------------------------------------------------------- 1 | package jp.wasabeef.blurry; 2 | 3 | import android.view.View; 4 | import android.view.animation.AlphaAnimation; 5 | 6 | /** 7 | * Copyright (C) 2020 Wasabeef 8 | *

9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | *

13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | *

15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | final class Helper { 23 | 24 | public static boolean hasZero(int... args) { 25 | for (int num : args) { 26 | if (num == 0) { 27 | return true; 28 | } 29 | } 30 | return false; 31 | } 32 | 33 | public static void animate(View v, int duration) { 34 | AlphaAnimation alpha = new AlphaAnimation(0f, 1f); 35 | alpha.setDuration(duration); 36 | v.startAnimation(alpha); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS 2 | .DS_store 3 | 4 | # Built application files 5 | *.apk 6 | *.ap_ 7 | 8 | # Files for the ART/Dalvik VM 9 | *.dex 10 | 11 | # Java class files 12 | *.class 13 | 14 | # Generated files 15 | bin/ 16 | gen/ 17 | out/ 18 | 19 | # Gradle files 20 | .gradle/ 21 | build/ 22 | 23 | # Local configuration file (sdk path, etc) 24 | local.properties 25 | 26 | # Proguard folder generated by Eclipse 27 | proguard/ 28 | 29 | # Log Files 30 | *.log 31 | 32 | # Android Studio Navigation editor temp files 33 | .navigation/ 34 | 35 | # Android Studio captures folder 36 | captures/ 37 | 38 | # IntelliJ 39 | *.iml 40 | .idea/workspace.xml 41 | .idea/tasks.xml 42 | .idea/gradle.xml 43 | .idea/assetWizardSettings.xml 44 | .idea/dictionaries 45 | .idea/libraries 46 | .idea/caches 47 | .idea/misc.xml 48 | .idea/modules.xml 49 | .idea/navEditor.xml 50 | .idea/markdown* 51 | .idea/jarRepositories.xml 52 | .idea/inspectionProfiles/Project_Default.xml 53 | .idea/compiler.xml 54 | projectFilesBackup/ 55 | 56 | # Keystore files 57 | # Uncomment the following line if you do not want to check your keystore files in. 58 | #*.jks 59 | 60 | # External native build folder generated in Android Studio 2.2 and later 61 | .externalNativeBuild 62 | 63 | # Google Services (e.g. APIs or Firebase) 64 | google-services.json 65 | 66 | -------------------------------------------------------------------------------- /blurry/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion COMPILE_SDK_VERSION as int 5 | 6 | defaultConfig { 7 | minSdkVersion MIN_SDK_VERSION as int 8 | targetSdkVersion TARGET_SDK_VERSION as int 9 | } 10 | } 11 | 12 | ext { 13 | bintrayRepo = 'maven' 14 | bintrayName = 'blurry' 15 | bintrayUserOrg = 'wasabeef' 16 | publishedGroupId = 'jp.wasabeef' 17 | libraryName = 'blurry' 18 | artifact = 'blurry' 19 | libraryDescription = 'Easy blur for Android' 20 | siteUrl = 'https://github.com/wasabeef/Blurry' 21 | gitUrl = 'https://github.com/wasabeef/Blurry.git' 22 | issueUrl = 'https://github.com/wasabeef/Blurry/issues' 23 | libraryVersion = VERSION_NAME 24 | developerId = 'wasabeef' 25 | developerName = 'Wasabeef' 26 | developerEmail = 'dadadada.chop@gmail.com' 27 | licenseName = 'The Apache Software License, Version 2.0' 28 | licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' 29 | allLicenses = ["Apache-2.0"] 30 | } 31 | 32 | // TODO: Close JCenter on May 1st https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/ 33 | // apply from: 'https://gist.githubusercontent.com/wasabeef/cf14805bee509baf7461974582f17d26/raw/bintray-v1.gradle' 34 | // apply from: 'https://gist.githubusercontent.com/wasabeef/cf14805bee509baf7461974582f17d26/raw/install-v1.gradle' 35 | 36 | apply from: 'https://gist.githubusercontent.com/wasabeef/2f2ae8d97b429e7d967128125dc47854/raw/maven-central-v1.gradle' 37 | -------------------------------------------------------------------------------- /example/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 23 | 24 | 32 | 33 | 42 | 43 | 52 | 53 | 58 | 59 |