Skip to content

Commit 61d68c3

Browse files
authored
fix(android): assign an id to host view (#585) (#587)
1 parent 726cd2e commit 61d68c3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

android/src/main/java/com/reactnativepagerview/PagerViewViewManager.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class PagerViewViewManager : ViewGroupManager<NestedScrollableHost>() {
2727

2828
override fun createViewInstance(reactContext: ThemedReactContext): NestedScrollableHost {
2929
val host = NestedScrollableHost(reactContext)
30+
host.id = View.generateViewId()
3031
host.layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
3132
host.isSaveEnabled = false
3233
val vp = ViewPager2(reactContext)

0 commit comments

Comments
 (0)