NumericKeypad is a Jetpack Compose library that provides a customizable numeric keypad, specifically designed for Android applications requiring sleek and functional numeric input.
- Simple and customizable design.
- Events for each number and delete action.
- Adjustable styles and colors for each key.
- Compatible with Material Theme.
To include NumericKeypad in your project, add the following dependency to your build.gradle file:
dependencies {
implementation 'com.thinkup:numeric-keypad-library:1.0'
}Here is a basic example of how to integrate NumericKeypad into your application:
import com.thinkup.numeric_keypad.NumericKeypadNumericKeypad(
onNumberClick = { /* handle number */ },
onDeleteClick = { /* handle delete */ },
)Main component that displays the numeric keypad.
Parameters:
modifier: Modifier to customize the layout of the keypad.onNumberClick: Lambda that is executed when a number is pressed.onDeleteClick: Lambda that is executed when the delete button is pressed.keyColor: Color of the keypad keys.fontStyle: Font style for the key text.textStyle: Text style for the keys.deleteIcon: Resource ID of the delete icon.
This is an example of how you can customize the NumericKeypad with different colors and styles:
NumericKeypad(
onNumberClick = { /* handle number */ },
onDeleteClick = { /* handle delete */ },
keyColor = Color.Yellow,
fontStyle = FontStyle.Italic,
textStyle = TextStyle(
fontFamily = fonts,
fontWeight = FontWeight.ExtraBold,
fontSize = 54.sp
),
deleteIcon = R.drawable.ic_delete
)| Preview | Enter Amount | Enter Pin |
|---|---|---|
![]() |
![]() |
![]() |


