Product: Native Android SDK
Product Version: 9.4.2 to 10.4.0
Please give a brief summary of your issue:
updating 9.4.2 to 10.4.0 cause compilation issue
Please describe your issue and provide steps to reproduce it:
We have a custom class instantiating a TabletAnnotationToolbarComponent
but after updating our sdk level it looks as thought the constructors needed to instantiate a TabletAnnotationToolbarComponent
. This is what is used to be in 9.4.2:
currentPdfViewCtrlFragment?.toolManager?.let { toolManager ->
val annotationBar = view?.findViewById<FrameLayout>(R.id.annotation_toolbar)
val vmProvider = ViewModelProvider(this)
val toolManagerVm: ToolManagerViewModel =
vmProvider[ToolManagerViewModel::class.java]
toolManager.addCustomizedTool(CheckmarkStamp(currentPdfViewCtrlFragment.pdfViewCtrl))
toolManager.addCustomizedTool(XStamp(currentPdfViewCtrlFragment.pdfViewCtrl))
toolManager.enableAnnotManager(if (hasAnnotationPermission) userID else "-1")
toolManagerVm.toolManager = toolManager
val presetVm: PresetBarViewModel = vmProvider[PresetBarViewModel::class.java]
val annotToolbarVm: AnnotationToolbarViewModel =
vmProvider[AnnotationToolbarViewModel::class.java]
annotationView = AnnotationToolbarView(annotationBar ?: return@let)
// Create our UI component for the annotation toolbar
mAnnotationToolbarComponent = TabletAnnotationToolbarComponent(
/* lifecycleOwner = */ this,
/* fragmentManager = */ childFragmentManager,
/* annotationToolbarViewModel = */ annotToolbarVm,
/* presetBarViewModel = */ presetVm,
/* toolManagerViewModel = */ toolManagerVm,
/* signatureViewModel = */ this.mSignatureViewModel,
/* view = */ annotationView ?: return@let,
/* presetBarView = */ this.presetBarComponent,
/* isInsideAnnotationToolbar = */ this.useTabletLayout(),
/* toolsToHidePresetBar = */ null,
/* hidePresetBar = */ this.mHidePresetBar,
)
}
This code above now won’t compile. How can I convert the 9.4.2 custom toolbar to work in the 10.4.0 constructor? I can’t find any documentation on this.
Please provide a link to a minimal sample where the issue is reproducible: