I'm trying to embedded a PDFViewer with this libra...
# compose
m
I'm trying to embedded a PDFViewer with this library into my jetpack compose app: https://github.com/barteksc/AndroidPdfViewer I have read that we have to use the AndroidView class for embedding legacy views:
Copy code
AndroidView(
                factory = { context ->

                    PDFView(context)
                })
The problem is that the constructor consumes an AttributeSet Object.
public PDFView(Context context, AttributeSet set) {
From where do i get this object? Didn't find anything on stackoverflow/google
a
AttributeSet
contains attributes when inflated from xml.
null
should be fine here.
m
Nice. Works! I'm so much in the kotlin game that i didn't thought about simply passing null 😅