Skip to content

Commit

Permalink
Change implementation of headerConfig prop on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
tboba committed Sep 6, 2023
1 parent e330f36 commit 0545a7e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion android/src/main/java/com/swmansion/rnscreens/Screen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.util.SparseArray
import android.view.ViewGroup
import android.view.WindowManager
import android.webkit.WebView
import androidx.core.view.children
import com.facebook.react.bridge.GuardedRunnable
import com.facebook.react.bridge.ReactContext
import com.facebook.react.uimanager.UIManagerModule
Expand Down Expand Up @@ -84,7 +85,15 @@ class Screen constructor(context: ReactContext?) : FabricEnabledViewGroup(contex
}

val headerConfig: ScreenStackHeaderConfig?
get() = getChildAt(0) as? ScreenStackHeaderConfig
get() {
for (child in children) {
if (child is ScreenStackHeaderConfig) {
return child
}
}

return null
}

/**
* While transitioning this property allows to optimize rendering behavior on Android and provide
Expand Down

0 comments on commit 0545a7e

Please sign in to comment.