Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
io.github.bobbysandhu:unified-date-time-picker
Advanced tools
A library to manage Date & Time with a single UI component.
UnifiedDateTimePicker would help you pick Date and Time with just single UI component. It's inspired & took from Telegram and extended with all the customization to fulfill the needs of any modern app.
Kotlin version of the library is also available here:
UnifiedDateTimePicker.Builder(this)
.setTitle("Select Date and Time")
.addListener(object : OnDateTimeSelectedListener {
override fun onDateTimeSelected(millis: Long) {
val sdf = SimpleDateFormat(DATE_FORMAT_Z, Locale.ROOT)
val calendar: Calendar = Calendar.getInstance()
calendar.timeInMillis = millis
binding.textDateTime.text = sdf.format(calendar.time)
}
override fun onPickerDismissed(millis: Long) {
/* no use as of now */
}
})
.show();
With default setting it would look like this:
UnifiedDateTimePicker.Builder(this)
.setTitle("Select Date and Time")
.titleTextColor(R.color.white)
.backgroundColor(R.color.big_stone)
.dateTimeTextColor(R.color.white)
.buttonColor(R.color.picton_blue)
.buttonTextColor(R.color.white)
.vibration(true) // heptic feedback when values are scrolled
//.setDateTimeMillis(/* long milliseconds*/)
.addListener(object : OnDateTimeSelectedListener {
override fun onDateTimeSelected(millis: Long) {
val sdf = SimpleDateFormat(DATE_FORMAT_Z, Locale.ROOT)
val calendar: Calendar = Calendar.getInstance()
calendar.timeInMillis = millis
binding.textDateTime.text = sdf.format(calendar.time)
}
override fun onPickerDismissed(millis: Long) {
/* no use as of now */
}
})
.show();
With all these customizations applied, it would look like:
// Top level build file
repositories {
// Add this to the end of any existing repositories
mavenCentral()
}
// app level dependencies section
dependencies {
implementation 'io.github.bobbysandhu:unified-date-time-picker:1.0.2'
}
Want to extend the feature, have any improvement or bug fix?
You can contribute and help the community. All you need to do is share your PR with clear message. That's it!!
FAQs
A library to manage Date & Time with a single UI component.
We found that io.github.bobbysandhu:unified-date-time-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.