HO
hongbeomi/Cloudy
☁️ Cloudy is help apply blur and filters to any View (kotlin)
Cloudy
☁️ Cloudy is help apply blur and filters to any view
⚡️ Include project
Gradle
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}And add a this code to your module's build.gradle file.
dependencies {
implementation 'com.github.hongbeomi:Cloudy:Tag'
}👀 Usage
Basic Example
val cloud = Cloudy.with(this) // context
// source view (any view) isPreBlur If you specify true, it starts immediately.
.from(imageView, isPreBlur = true)
// recommend argb (@ColorInt)
.color(Color.parseColor("#50ffffff"))
// set radius
.radius(200f)
// target view (any view)
.into(textView) Lazy start blur
cloud.blur() // start blurLazy change Color
cloud.color(Color.CYAN) // @ColorIntLazy change Radius
cloud.radius(25f) // range is 0f .. 200fScroll Changed Listener
// vertical
verticalScrollView.setOnScrollChangeListener { _, _, scrollY, _, _ ->
cloud.onVerticalScroll(scrollY)
}
// horizontal
horizontalScrollView.setOnScrollChangeListener { _, scrollX, _, _, _ ->
cloud.onHorizontalScroll(scrollX)
}Clear
// target view background = null
cloud.clear()Get blurred bitmap
cloud.get() // nullable bitmapBlur Algorithm
- Stack Blur - Mario Klingemann link
🙌 Thanks
- [Blurry] wasabeef - https://github.com/wasabeef/Blurry
- [BlurSample] charlezz - https://github.com/Charlezz/BlurSample
🌟 Find this project useful?
Support it by joining stargazers for this repository
📝 License
Copyright [2021] [Hongbeom Ahn]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
On this page
Languages
C++53.5%Kotlin41.9%CMake4.6%
Contributors
Apache License 2.0
Created January 26, 2021
Updated October 24, 2024



