Skip to content

Commit

Permalink
add the structure of the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
kul3r4 committed Jun 14, 2024
1 parent 2f6441c commit a5736c1
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,28 @@ fun VoiceInputScreen() {
}
}

// [START_EXCLUDE android_wear_voice_input]
val scrollState = rememberScrollState()

ScreenScaffold(scrollState = scrollState) {
//rest of implementation here
// [START_EXCLUDE]
val padding = ScalingLazyColumnDefaults.padding(
first = ItemType.Text,
last = ItemType.Chip
)()
// [END_EXCLUDE]
Column(
//rest of implementation here
// [START_EXCLUDE]
modifier = Modifier
.fillMaxSize()
.verticalScroll(scrollState)
.rotaryWithScroll(scrollState)
.padding(padding),
verticalArrangement = Arrangement.Center
) {
// [END_EXCLUDE android_wear_voice_input]
// [END_EXCLUDE]

// Create an intent that can start the Speech Recognizer activity
val voiceIntent: Intent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH).apply {
putExtra(
Expand All @@ -114,9 +119,7 @@ fun VoiceInputScreen() {
label = stringResource(R.string.voice_input_label),
secondaryLabel = textForVoiceInput
)
// [START_EXCLUDE android_wear_voice_input]
}
}
// [END_EXCLUDE android_wear_voice_input]
// [END android_wear_voice_input]
}

0 comments on commit a5736c1

Please sign in to comment.