项目作者: yaroslav-android

项目描述 :
Range Picker custom view for Android
高级语言: Kotlin
项目地址: git://github.com/yaroslav-android/RangePicker.git
创建时间: 2019-02-06T09:37:08Z
项目社区:https://github.com/yaroslav-android/RangePicker

开源协议:Apache License 2.0

下载


RangePicker



preview

Attributes:

In Table 1 you could see list of available attributes.

Attribute name Description Example
backgroundSelectedTint Change background color of selected item app:backgroundSelectedTint="@color/colorPrimary"
backgroundStripTint Change background color of strip between 2 selected items app:backgroundStripTint="@color/colorPrimary"
textColorOnSelected Change color of text on backgroundSelectedTint app:textColorOnSelected="@color/colorPrimary"
textColorOnSurface Change color of text on other surface app:textColorOnSurface="@color/colorPrimary"
cornerRadius Change corner radius for selected background app:cornerRadius="@dimen/some_value"
stripThickness Change thickness of strip between 2 selected items app:stripThickness="@dimen/some_value"
extraPadding Change padding of inside selected items app:extraPadding="@dimen/some_value"
android:textSize Change all texts size android:textSize="@dimen/some_value"
android:fontFamily Change all texts font android:fontFamily="@font/sone_font"

Table 1 - list of available attributes

Planned:

  • Dragging selected items
  • Add possibility to change view properties programatically
  • Allow set default selected items by position
  • Add change listener
  • Test coverage

Dependencies:

Maven:

  1. <repositories>
  2. <repository>
  3. <id>jitpack.io</id>
  4. <url>https://jitpack.io</url>
  5. </repository>
  6. </repositories>
  1. <dependency>
  2. <groupId>com.github.yaroslav-android</groupId>
  3. <artifactId>RangePicker</artifactId>
  4. <version>version</version>
  5. </dependency>

or Gradle:

  1. allprojects {
  2. repositories {
  3. ...
  4. maven { url 'https://jitpack.io' }
  5. }
  6. }
  1. dependencies {
  2. implementation 'com.github.yaroslav-android:RangePicker:version'
  3. }