Skip to content

Commit

Permalink
Use KeyboardCapitalization.Sentences
Browse files Browse the repository at this point in the history
  • Loading branch information
nbradbury committed Aug 8, 2024
1 parent 2f62673 commit bd868ee
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
Expand All @@ -41,6 +42,7 @@ import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.KeyboardCapitalization
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.flow.MutableStateFlow
Expand Down Expand Up @@ -120,6 +122,9 @@ private fun MessageSection(
onMessageChanged(it.take(MAX_CHARS))
},
shape = RoundedCornerShape(8.dp),
keyboardOptions = KeyboardOptions.Default.copy(
capitalization = KeyboardCapitalization.Sentences
),
modifier = Modifier
.fillMaxWidth()
.defaultMinSize(minHeight = 180.dp)
Expand Down

0 comments on commit bd868ee

Please sign in to comment.