Merge pull request #1760 from Stillswarm/Stillswarm-patch-1

Use TextButton instead of Button with Clickable in Settings Dialog
pull/1837/head
Don Turner 9 months ago committed by GitHub
commit b950fe8cfb

@ -20,7 +20,6 @@ package com.google.samples.apps.nowinandroid.feature.settings
import android.content.Intent import android.content.Intent
import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.ColumnScope
@ -141,14 +140,16 @@ fun SettingsDialog(
TrackScreenViewEvent(screenName = "Settings") TrackScreenViewEvent(screenName = "Settings")
}, },
confirmButton = { confirmButton = {
Text( NiaTextButton(
text = stringResource(string.feature_settings_dismiss_dialog_button_text), onClick = onDismiss,
style = MaterialTheme.typography.labelLarge, modifier = Modifier.padding(horizontal = 8.dp),
color = MaterialTheme.colorScheme.primary, ) {
modifier = Modifier Text(
.padding(horizontal = 8.dp) text = stringResource(string.feature_settings_dismiss_dialog_button_text),
.clickable { onDismiss() }, style = MaterialTheme.typography.labelLarge,
) color = MaterialTheme.colorScheme.primary,
)
}
}, },
) )
} }

Loading…
Cancel
Save