Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/

package com.example.compose.snippets.text

import android.text.TextUtils
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
Expand Down Expand Up @@ -249,7 +247,7 @@ class CustomInputTransformation : InputTransformation {
// [START android_compose_state_text_16]
class DigitOnlyInputTransformation : InputTransformation {
override fun TextFieldBuffer.transformInput() {
if (!TextUtils.isDigitsOnly(asCharSequence())) {
if (!asCharSequence().isDigitsOnly()) {
revertAllChanges()
}
}
Expand Down