Update speaker sample#1377
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the navigation in both the DataLayer Wearable app and the WearSpeakerSample app to the new Navigation 3 API, introducing Kotlin serialization for navigation keys. It also updates several dependencies and replaces Horologist's responsive column padding with minimumVerticalContentPadding on list items. Feedback is provided regarding the incorrect usage of minimumVerticalContentPadding on a non-interactive Text element in WearApp.kt, and the use of the deprecated RuntimeEnvironment.getApplication() in SpeakerPlayerScreenTest.kt which should be replaced with ApplicationProvider.getApplicationContext().
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
I am having trouble creating individual review comments. Click here to see my feedback.
DataLayer/Wearable/src/main/java/com/example/android/wearable/datalayer/WearApp.kt (186-190)
Applying minimumVerticalContentPadding (with ButtonDefaults.minimumVerticalListContentPadding) to a non-interactive Text element is semantically incorrect. This modifier is designed to ensure interactive elements meet minimum touch target requirements (typically 48dp) on Wear OS. For static text, standard padding or spacers should be used instead to control spacing, or the modifier can be removed entirely if no extra padding is needed.
modifier = Modifier.fillMaxWidth(),WearSpeakerSample/wear/src/test/java/com/example/android/wearable/speaker/SpeakerPlayerScreenTest.kt (59)
Using RuntimeEnvironment.getApplication() is deprecated in Robolectric. It is recommended to use ApplicationProvider.getApplicationContext() from androidx.test.core.app instead to obtain the context in a modern and compatible way.
val context = androidx.test.core.app.ApplicationProvider.getApplicationContext<android.content.Context>()
val vibrator = context.getSystemService(android.content.Context.VIBRATOR_SERVICE) as android.os.Vibrator2bf7c68 to
c0a1fa8
Compare
ceff59e to
42e3846
Compare
Update speaker sample to Compose 1.6 and fix screenshots tests