Replies: 2 comments 2 replies
-
Hello, AndroidViewFilterRender require that the view is inflated before set the filter because it is using the canvas render only available while it is inflated. If you want use the view invisible (in background) you can try inflate the view like this: |
Beta Was this translation helpful? Give feedback.
-
Hello, This is the expected result. The filter copy a view and set it to the stream so all is working as expected. You have the original view and the copy in the stream. |
Beta Was this translation helpful? Give feedback.
-
Hey Pedro,
I want to create different graphic overlays for some small games.
As first step I just thought about a basic result overlay like used in football (two teams with a score each, black text on a white rectangle background).
As far as I understand this list of filter are available out of the box with your library and they can be used more or less in this way.
Looking through this list I thought of androidViewFilterRender as the best option to create that overlay.
I would love to use composables to create those views and tried to use ComposeView as introduced in this android developer guide.
I created an easy example and wanted to integrate it into a CameraPreview Composable:
But running the application always ends in an IllegalStateException:
Searching the web I was not able to find any solution that applies here. Maybe you have any idea?
If not I guess doing it the old xml based way will work as well.
Or do you recommend using other filters for the use case I specified?
Thanks, Max
Beta Was this translation helpful? Give feedback.
All reactions