SemBlurCompat

Provides compatibility methods for Samsung's blur effects.

This object allows applying blur effects to views, with options for different blur modes, colors, radii, and corner radii. It also handles checks for theme application and accessibility settings that might disable blur effects.

The blur functionality is based on Samsung's internal APIs and may not work on all devices or Android versions.

Types

Link copied to clipboard
annotation class SeslBlurMode

Properties

Link copied to clipboard
const val BLUR_BASE_OFFSET: Int = 101
Link copied to clipboard
const val BLUR_MODE_CANVAS: Int = 2
Link copied to clipboard
const val BLUR_MODE_WINDOW: Int = 0
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Checks if the blur effect preset functionality is supported on the current device.

Link copied to clipboard
fun setBlurEffect(view: View, @ColorInt color: Int, radius: Int, blurMode: Int, cornerRadius: Float): Boolean

Sets a blur effect on the given view on a device running Samsung's One UI.

Link copied to clipboard
fun setBlurEffectPreset(view: View, blurMode: Int, colorCurvePreset: Int, @ColorInt color: Int? = null, cornerRadius: Float? = null): Boolean

Sets a preset blur effect on the given view on a device running Samsung's One UI.

Link copied to clipboard

Clears any blur information previously set on the given view.