Skip to content

thinkupsoft/AOS-NumericKeypad

Repository files navigation

AOS-NumericKeypad

en es

NumericKeypad is a Jetpack Compose library that provides a customizable numeric keypad, specifically designed for Android applications requiring sleek and functional numeric input.

Features

  • Simple and customizable design.
  • Events for each number and delete action.
  • Adjustable styles and colors for each key.
  • Compatible with Material Theme.

Installation

To include NumericKeypad in your project, add the following dependency to your build.gradle file:

dependencies {
    implementation 'com.thinkup:numeric-keypad-library:1.0'
}

Usage Example

Here is a basic example of how to integrate NumericKeypad into your application:

import com.thinkup.numeric_keypad.NumericKeypad
NumericKeypad(
    onNumberClick = { /* handle number */ },
    onDeleteClick = { /* handle delete */ },
)

Available Parameters

NumericKeypad

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.

Advanced Example

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages