Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A tiny Android library for displaying a TimePicker with From and To ranges as a BottomSheetDialogFragment.

License

NotificationsYou must be signed in to change notification settings

oheyadam/BottomSheetTimeRangePicker

Repository files navigation

LicenseAndroid Arsenal

BottomSheetPickers

BottomSheetPickers is a tiny Android library for adding Date and Time Pickers as Modal BottomSheetDialogs with From and To ranges.

The library is inspired by Titto Jose'sTimeRangePicker.

Screenshots

Installation

Add Jitpack to your project build.gralde file

  allprojects {repositories {...maven { url 'https://jitpack.io' }}}

}

Then add this dependency to your app build.gradle file.

  dependencies {        implementation 'com.github.adawoud:BottomSheetTimeRangePicker:latest-release'}

Usage

Make sure your Activity/Fragment implementsOnTimeRangeSelectedListener, and then youcan just do this:

BottomSheetTimeRangePicker.newInstance(this, DateFormat.is24HourFormat(this)).show(supportFragmentManager, tagBottomSheetTimeRangePicker)

You can see this in action in the sample apphere

Customization

You can customize things like the text displayed in the From and To tabs, the text that appears on the positive action button,and set intial times for both timepickers

BottomSheetTimeRangePicker.tabLabels(startTabLabel = "Hello", endTabLabel = "World").doneButtonLabel("Ok").startTimeInitialHour(2)    .startTimeInitialMinute(11)    .endTimeInitialHour(10)    .endTimeInitialMinute(22)    .newInstance(this, DateFormat.is24HourFormat(this))   .show(supportFragmentManager, tagBottomSheetTimeRangePicker)

License

Copyright 2018 Ahmad Dawoud

Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.

About

A tiny Android library for displaying a TimePicker with From and To ranges as a BottomSheetDialogFragment.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp