Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ class ColorsModule(reactContext: ReactApplicationContext) : NativeColorsSpec(rea

private fun getColorFromAttr(@AttrRes attr: Int): String {
val typedArray = themedContext!!.theme.obtainStyledAttributes(intArrayOf(attr))
val color = typedArray.use {
it.getColor(0, 0)
val color = try {
typedArray.getColor(0, 0)
} finally {
typedArray.recycle()
}

val alpha = (color shr 24) and 0xFF
Expand Down