Skip to content

Latest commit

History

History
57 lines (44 loc) 路 2.92 KB

README.md

File metadata and controls

57 lines (44 loc) 路 2.92 KB

Compose Number Picker Library for Android

Maven Central GitHub release Android CI API PRs Welcome

Compose Number Picker is a library, which provides a simple to use, lightweight number picker component for Jetpack Compose. It has support for horizontal and vertical orientation.

Try it

If you want to test the library, please visit the sample app on Google Play!

Screenshots (Android 11)

Usage

If you haven't Jetpack Compose ready to go in your project, please refer to this guide to include Jetpack Compose into your project.

Then include ComposeNumberPicker to your project:

implementation 'com.chillibits:composenumberpicker:1.1.2'

As Compose Number Picker supports horizontal and vertical orientation, it provides two components for use:

This is like a HorizontalNumberPicker would look like in your Compose layout:

HorizontalNumberPicker(
    min = 10,
    max = 100,
    default = 50,
    modifier = Modifier.padding(10.dp),
	onValueChange = { value ->
		Toast.makeText(this@MainActivity, value.toString(), Toast.LENGTH_SHORT).show()
	}
)

If you need an example, please look into the code of the demo app.

Supported languages

Here are the currently supported languages for the demo app. The library itself is language independent.

  • English
  • German
  • French

New translations are highly appreciated. If you want to translate the lib, please open a pr.

Contribute to the project

If you want to contribute to this project, please feel free to send us a pull request.

Credits

Thanks to all contributors and translators!

漏 Marc Auberer 2021