Skip to content

Commit 89bcc02

Browse files
mdvaccameta-codesync[bot]
authored andcommitted
Add KDoc documentation to BlendModeHelper (#54347)
Summary: Pull Request resolved: #54347 Added comprehensive KDoc documentation to the BlendModeHelper object and its public method for parsing CSS mix-blend-mode properties on Android Q+. changelog: [internal] internal Reviewed By: lenaic Differential Revision: D85926891 fbshipit-source-id: bcafa6b02281d5265f59b34641847bc3b19d6604
1 parent ad0210c commit 89bcc02

File tree

1 file changed

+14
-1
lines changed
  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager

1 file changed

+14
-1
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BlendModeHelper.kt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,23 @@ import android.view.ViewGroup
1414
import androidx.core.view.children
1515
import com.facebook.react.R
1616

17+
/**
18+
* Helper object for parsing and handling CSS mix-blend-mode properties on Android Q+ (API 29+).
19+
*
20+
* This object provides utilities to convert CSS mix-blend-mode string values into Android's
21+
* [BlendMode] enumeration and to determine when views need isolated layers for proper blending.
22+
*/
1723
@TargetApi(29)
1824
internal object BlendModeHelper {
1925

20-
/** @see <a href="https://www.w3.org/TR/compositing-1/#mix-blend-mode">mix-blend-mode</a> */
26+
/**
27+
* Parses a CSS mix-blend-mode string value into an Android BlendMode.
28+
*
29+
* @param mixBlendMode The CSS mix-blend-mode value (e.g., "multiply", "screen", "overlay")
30+
* @return The corresponding [BlendMode], or null if "normal" or on unsupported Android versions
31+
* @throws IllegalArgumentException if the mix-blend-mode name is invalid
32+
* @see <a href="https://www.w3.org/TR/compositing-1/#mix-blend-mode">mix-blend-mode</a>
33+
*/
2134
@JvmStatic
2235
fun parseMixBlendMode(mixBlendMode: String?): BlendMode? {
2336
if (mixBlendMode == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {

0 commit comments

Comments
 (0)