-
Notifications
You must be signed in to change notification settings - Fork 21
Allow SafeArea to Capture the Bitmap #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow SafeArea to Capture the Bitmap #36
Conversation
This change modifies the patchable composables and the `PatchableToBitmap` composable to handle bitmap capturing more directly. Refactor PatchableBoundingBox composable Refactor: Remove explicit `androidx.compose.ui.graphics.ImageBitmap` type
489e7f5 to
cec7393
Compare
| Spacer(modifier = Modifier.weight(1f)) | ||
| } | ||
| } | ||
| TextField(value = name, onValueChange = { name = it }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes this particular patch interactive so you can change the name on the patch. The part that will be converted is in the SafeArea. See the screenshot
| # thereby reducing the size of the R class for that library | ||
| android.nonTransitiveRClass=true | ||
| android.nonTransitiveRClass=true | ||
| ksp.incremental=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the line that makes it always generate the PatchRegistry. Its a hack I know I know.
mariobodemann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, looks easier and more straight forward than I imagined!
Make the SafeArea capture the bitmap. So that the demo Patch Composables can have an interactive part. See AndyA Demo which has a text field to specify the text.
This requires the annotation generated code to have parameters now to trigger the bitmap creation of the safe area.
