Fix SegmentedButton shape

This commit is contained in:
tarsin committed 2023-07-27 07:59:02 +08:00
1 parent 4827b7e077
commit 14faa38de3
1 file changed
+3 -2
@@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.systemBars
import androidx.compose.material3.Button
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SegmentedButton
import androidx.compose.material3.SegmentedButtonDefaults
import androidx.compose.material3.SingleChoiceSegmentedButtonRow
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
@@ -53,10 +54,10 @@ fun SelectSiteScreen() {
)
Spacer(modifier = Modifier.weight(1f))
SingleChoiceSegmentedButtonRow {
SegmentedButton(selected = !siteEx, onClick = { siteEx = false }) {
SegmentedButton(selected = !siteEx, onClick = { siteEx = false }, shape = SegmentedButtonDefaults.shape(0, 2)) {
Text(text = stringResource(id = R.string.site_e))
}
SegmentedButton(selected = siteEx, onClick = { siteEx = true }) {
SegmentedButton(selected = siteEx, onClick = { siteEx = true }, shape = SegmentedButtonDefaults.shape(1, 2)) {
Text(text = stringResource(id = R.string.site_ex))
}
}