Skip to content

Add MediaQuery sample#47

Merged
JonEckenrode merged 11 commits into
mainfrom
add-mediaquery-sample
May 13, 2026
Merged

Add MediaQuery sample#47
JonEckenrode merged 11 commits into
mainfrom
add-mediaquery-sample

Conversation

@JonEckenrode

Copy link
Copy Markdown
Contributor

Add a MediaQuery sample for the adaptive apps development hub samples page.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Android sample application, MediaQuerySample, which demonstrates how to use the ExperimentalMediaQueryApi in Jetpack Compose for building adaptive UIs. The sample includes a dashboard that reacts to device posture, input peripherals, and hardware sensors. Feedback suggests removing several unused imports and redundant @OptIn annotations throughout MediaQueryDashboard.kt. Additionally, it is recommended to refactor the layout logic to reduce code duplication and to replace LocalConfiguration with the mediaQuery API for retrieving device orientation and dimensions to maintain consistency with the sample's purpose.

@chikoski chikoski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating the sample. I left some comments. Please take a look at them.

Comment thread MediaQuery/app/src/main/java/com/example/mediaquerysample/MediaQuerySample.kt Outdated
Comment thread MediaQuery/app/src/main/java/com/example/mediaquerysample/MediaQuerySample.kt Outdated
Comment thread MediaQuery/app/src/main/java/com/example/mediaquerysample/MediaQuerySample.kt Outdated
Comment thread MediaQuery/app/src/main/java/com/example/mediaquerysample/MediaQuerySample.kt Outdated
Comment thread MediaQuery/app/src/main/java/com/example/mediaquerysample/MediaQuerySample.kt Outdated
Comment thread MediaQuery/app/src/main/java/com/example/mediaquerysample/MediaQuerySample.kt Outdated

@tiwiz tiwiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment, but overall LGTM

@JonEckenrode JonEckenrode merged commit 62abdd2 into main May 13, 2026
11 checks passed
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.

3 participants