This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.composed | |
import androidx.compose.ui.ExperimentalComposeUiApi | |
import androidx.compose.ui.focus.onFocusChanged | |
import androidx.compose.ui.layout.boundsInWindow | |
import androidx.compose.ui.layout.onGloballyPositioned | |
import androidx.compose.ui.autofill.AutofillNode | |
import androidx.compose.ui.autofill.AutofillType | |
import androidx.compose.ui.platform.LocalAutofill | |
import androidx.compose.ui.platform.LocalAutofillTree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.DecimalFormat | |
import androidx.core.text.isDigitsOnly | |
import androidx.compose.ui.text.AnnotatedString | |
import androidx.compose.ui.text.input.OffsetMapping | |
import androidx.compose.ui.text.input.TransformedText | |
import androidx.compose.ui.text.input.VisualTransformation | |
private val String.isValidForFormatting get(): Boolean = | |
isNotBlank() && isDigitsOnly() && length <= 6 |