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:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.yaroslav-android</groupId>
<artifactId>RangePicker</artifactId>
<version>version</version>
</dependency>
or Gradle:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.yaroslav-android:RangePicker:version'
}