Skip to content

Adds DrawArea sample #599

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Adds DrawArea sample #599

wants to merge 7 commits into from

Conversation

cartland
Copy link
Contributor

This commit introduces a new code snippet demonstrating a DrawArea composable. This composable provides a canvas for drawing and processes touch input to draw lines. The drawing state is managed by a DrawAreaViewModel.

The sample is designed for the Android documentation:
https://developer.android.com/develop/ui/compose/touch-input/input-compatibility-on-large-screens#stylus

This commit introduces a new code snippet demonstrating a `DrawArea` composable.
This composable provides a canvas for drawing and processes touch input to draw lines.
The drawing state is managed by a `DrawAreaViewModel`.

The sample is also integrated into the main snippets navigation.
Copy link

snippet-bot bot commented Aug 22, 2025

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

cartland and others added 5 commits August 22, 2025 17:40
Updates the region tags in DrawAreaSample.kt to conform to the
`android_compose_` prefix requirement.
The `DrawAreaSample.kt` file was moved to a new package `com.example.compose.snippets.touchinput.pointerinput`.

The import for `DrawArea` in `SnippetsActivity.kt` was updated to reflect this change.
Updates the region tags in DrawAreaSample.kt to conform to the
`android_snippets_compose_` prefix requirement.
@sushantsikka sushantsikka self-assigned this Aug 23, 2025
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.

2 participants