Skip to content

Android: add the zoomCoverScale no-op setter that codegen requires - #7

Merged
artemlitch merged 1 commit into
readwisefrom
artem/zoom-cover-scale
Aug 28, 2026
Merged

Android: add the zoomCoverScale no-op setter that codegen requires#7
artemlitch merged 1 commit into
readwisefrom
artem/zoom-cover-scale

Conversation

@artemlitch

Copy link
Copy Markdown
Contributor

Fixes the Android build break introduced by #6. Production build 0.135.69 failed on this.

What broke

e: ModalScreenViewManager.kt:6:1 Class 'ModalScreenViewManager' is not abstract and
   does not implement abstract member: fun setZoomCoverScale(view: T!, value: Float): Unit
e: ScreenViewManager.kt:28:6 Class 'ScreenViewManager' is not abstract and
   does not implement abstract member: fun setZoomCoverScale(view: T!, value: Float): Unit

> Task :react-native-screens:compileReleaseKotlin FAILED

Why

zoomCoverScale is iOS-only, but the Fabric spec is not. Codegen reads ScreenNativeComponent.ts on Android too and puts setZoomCoverScale on the generated ScreenManagerInterface, so the Kotlin view manager must implement it whether or not Android does anything with it. The @platform ios annotation in the JSDoc is documentation, not a codegen instruction.

Every other iOS-only zoom prop already carries a no-op override in ScreenViewManager for exactly this reason — setZoomCloseOvershoot and setZoomShowDebugBorders sit immediately around where this one goes. #6 added the spec entry and missed the Kotlin side.

ModalScreenViewManager extends ScreenViewManager, so it inherits the override and both errors clear with the single addition.

Scope

Five lines, Android only, no behaviour change on either platform — the setter does nothing, matching its neighbours.

Adding zoomCoverScale to the Fabric specs broke every Android build:

  e: ModalScreenViewManager.kt: Class 'ModalScreenViewManager' is not abstract
     and does not implement abstract member: fun setZoomCoverScale(view: T!, value: Float)
  e: ScreenViewManager.kt: Class 'ScreenViewManager' is not abstract and does
     not implement abstract member: fun setZoomCoverScale(view: T!, value: Float)

The prop is iOS-only, but the Fabric spec is not. Codegen reads
ScreenNativeComponent.ts on Android too and puts setZoomCoverScale on the
generated ScreenManagerInterface, so the Kotlin view manager has to implement
it whether or not Android does anything with it. The @platform ios annotation
in the docs is not a codegen instruction.

Every other iOS-only zoom prop already carries a no-op override in
ScreenViewManager for exactly this reason, next to setZoomCloseOvershoot and
setZoomShowDebugBorders. This adds the missing one.

ModalScreenViewManager extends ScreenViewManager, so it inherits the override
and both errors clear.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@artemlitch
artemlitch merged commit 5d5060a into readwise Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant