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
Environment diagnose: | |
[✓] Operation System | |
➤ Version OS: macOS 14.0 | |
CPU: Apple M1 Pro | |
[✓] Java | |
➤ Java (openjdk version "17.0.6" 2023-01-17) | |
Location: /Users/USER_NAME/Applications/Android Studio Giraffe 2022.3.1 Patch 2.app/Contents/jbr/Contents/Home//bin/java | |
➤ JAVA_HOME: /Users/USER_NAME/Applications/Android Studio Giraffe 2022.3.1 Patch 2.app/Contents/jbr/Contents/Home/ | |
i JAVA_HOME does not match Java binary location |
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 |