Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/malekkamel/rxdatetimepicker
https://github.com/malekkamel/rxdatetimepicker
android android-library date datepicker datetime datetimepicker java java-8 rxjava2 timepicker
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/malekkamel/rxdatetimepicker
- Owner: MalekKamel
- Created: 2018-08-29T14:37:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-28T02:21:49.000Z (over 3 years ago)
- Last Synced: 2024-10-09T11:04:36.913Z (3 months ago)
- Topics: android, android-library, date, datepicker, datetime, datetimepicker, java, java-8, rxjava2, timepicker
- Language: Java
- Size: 308 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RxDateTimePicker
## RxJava wrapper for date and time pickers.
||||
# Installation
[ ![Download](https://api.bintray.com/packages/shabankamel/android/rxdatetimepicker/images/download.svg) ](https://bintray.com/shabankamel/android/rxdatetimepicker/_latestVersion)
```gradle
dependencies {
implementation 'com.sha.kamel:rx_date_time_picker:1.0.0@aar'
}
```# Usage:
## RxDatePicker
```java
RxTimePicker.newInstance()
.show(getSupportFragmentManager())
.asObservable()
.subscribe(timeInfo -> {
String msg = timeMessage(timeInfo);
tv_date.setText(msg);
});
```## RxTimePicker
```java
RxDatePicker.newInstance()
.minDate(System.currentTimeMillis() - (4 * 24 * 60 * 60 * 1000)) // 4 days
.maxDate(System.currentTimeMillis() + (4 * 24 * 60 * 60 * 1000))
.show(getSupportFragmentManager())
.asObservable()
.subscribe(dateInfo -> {
String msg = dateMessage(dateInfo);
tv_time.setText(msg);
});
```## RxDateTimePicker
```java
RxDateTimePicker.newInstance()
.minDate(System.currentTimeMillis() - (4 * 24 * 60 * 60 * 1000)) // 4 days
.maxDate(System.currentTimeMillis() + (4 * 24 * 60 * 60 * 1000))
.show(getSupportFragmentManager())
.asObservable()
.subscribe(dateTimeInfo -> {
String msg = new StringBuilder()
.append(dateMessage(dateTimeInfo.getDateInfo()))
.append("\n")
.append(timeMessage(dateTimeInfo.getTimeInfo()))
.toString();
tv_dateTime.setText(msg);});
```### See 'app' module for the full code.
# License
## Apache license 2.0