Releases: davidmigloz/number-keyboard
Releases · davidmigloz/number-keyboard
5.0.2
- Removed
onAmountChange: (String) -> Unitand merge withNumberKeyboardListenerimplementation, FixedrawAmounthaving 0 in front. by @delacrixmorgan in #47
⚠️ Breaking Changes
- Removed
onAmountChange: (String) -> Unitand merge withNumberKeyboardListenerimplementation.
🧭 Migration Guide
var amountWithCurrency by remember { mutableStateOf("$currencySymbol 0") }
var amount by remember { mutableStateOf("") }
NumberKeyboard(
amount = amount,
listener = object : NumberKeyboardListener {
override fun onUpdated(data: NumberKeyboardData) {
amountWithCurrency = data.currency
amount = data.rawAmount
}
}
)5.0.1
- Fix Android target and Maven publish by @davidmigloz in #46
5.0.0
- Migrate to Kotlin Multiplatform by @delacrixmorgan in #45
✨ New Features
• Introduced NumberKeyboardFormat enum to control keypad layout:
enum class NumberKeyboardFormat {
Normal, // Standard ascending layout (like phone dial pad)
Inverted, // Descending layout (like a calculator)
Scrambled, // Shuffled once on composition
AlwaysScrambled // Re-shuffles every tap (chaos, but secure chaos)
}⚠️ Breaking Changes
isInverted: Booleanis now deprecated
One flag was never enough. Now you’ve got four layout options to rule them all. Replace
isInverted = truewith:
format = NumberKeyboardFormat.Inverted🧭 Migration Guide
| Before | After |
|---|---|
| isInverted = false | format = NumberKeyboardFormat.Normal |
| isInverted = true | format = NumberKeyboardFormat.Inverted |
NumberKeyboardis now a stateless composable.- Removed internal
rememberstate for the input amount. - You must provide:
amount: StringonAmountChange: (String) -> Unit
- Removed
initialAmountattribute. - This enables external state management and improves integration with architectures like MVI,
ViewModel, etc.
- Removed internal
Before:
NumberKeyboard() // internally remembered stateAfter:
var amount by remember { mutableStateOf("") }
NumberKeyboard(
amount = amount,
onAmountChange = { amount = it }
)4.0.8
- Update dependencies and target SDK 36
- Fix import for LocalContentColor
4.0.7
- Added
iconTintandcolorsparameters toNumberKeyboardAuxButtonto allow
customization of delete button color and styling
4.0.3
- Fix max amount formatting with correct separator
- Add initialAmount support and cleanup unused ExperimentalLayoutApi warnings
4.0.2
- Fix JitPack Java version
4.0.0
- Revamped Number Keyboard to Compose #37 (thanks @delacrixmorgan!)
3.1.0
- Add text size attribute (thanks @gerynugrh)
- Add typeface attribute (thanks @gerynugrh)
- Add KeyboardCustomSquareActivity to show custom square design (thanks @delacrixmorgan)
- Update dependencies
3.0.0
- Migrate to Kotlin #21
- Refactor support lib to AndroidX #13
- Extract dependencies and configurations from build files #22
- Add numberkeyboard_ resource prefix #23 (breaking change)
Migration
Add the prefix numberkeyboard_ to all the library attributes and resources.
E.g.
Before: keyboard:keyboardType="integer"
Now: keyboard:numberkeyboard_keyboardType="integer"