The missing view for android.

Related tags

UI/UX range-seek-bar
Overview

RangeSeekBar

The missing view for android.

Android Arsenal

Screenshot

Usage

First add jitpack to your projects build.gradle file

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

Then add the dependency in your android app module's build.gradle file.

If you are upgrading from a previous version, please take a look at changelogs to make sure nothing will break.

dependencies {
    implementation 'com.github.Innovattic:range-seek-bar:v1.0.6'
}

Then use the view in your layouts:

<com.innovattic.rangeseekbar.RangeSeekBar
    android:id="@+id/rangeSeekBar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/colorAccent" />

Attributes

You can change view attributes directly from your layout's xml file or in your java/kotlin code:

Variable / Function XML Attribute Type Description
trackColor rsb_trackColor color Color of horizontal track
trackSelectedColor rsb_trackSelectedColor color Color of the selected range of horizontal track
trackThickness rsb_trackThickness dimension The thickness of the horizontal track
trackSelectedThickness rsb_trackSelectedThickness dimension The thickness of the selected range of horizontal track
sidePadding rsb_sidePadding dimension Side padding for view, by default 16dp on the left and right
touchRadius rsb_touchRadius dimension The acceptable touch radius around thumbs in pixels
minThumbOffset rsb_minThumbOffsetVertical dimension Vertical offset of min thumb
minThumbOffset rsb_minThumbOffsetHorizontal dimension Horizontal offset of min thumb
maxThumbOffset rsb_maxThumbOffsetVertical dimension Vertical offset of max thumb
maxThumbOffset rsb_maxThumbOffsetHorizontal dimension Horizontal offset of max thumb
minThumbDrawable rsb_minThumbDrawable reference The drawable to draw min thumb with
maxThumbDrawable rsb_maxThumbDrawable reference The drawable to draw max thumb with
minRange rsb_minRange integer The minimum range to be selected. It should at least be 1
max rsb_max integer The maximum value of thumbs which can also be considered as the maximum possible range
trackRoundedCaps rsb_trackRoundedCaps boolean If the track should have rounded caps.
trackSelectedRoundedCaps rsb_trackSelectedRoundedCaps boolean If the selected range track should have rounded caps.
setMinThumbValue(integer) rsb_initialMinThumbValue integer Value of min thumb
setMaxThumbValue(integer) rsb_initialMaxThumbValue integer Value of max thumb

Changelogs

  • v1.0.8:
    • Fixed #20: Remove gap on the sides of the track
    • Fixed #23: setEnabled not working
  • v1.0.7: Minor improvements and dependency updates
  • v1.0.6:
    • Fixed ScrollView stealing focus issue. (#4)
    • Added xml attributes to set initial values of min and max thumbs. (#9)
  • v1.0.5: Converted thumb position offset attributes to dimensions instead of integer
  • v1.0.4: Added option to make tracks have rounded caps
  • v1.0.3: AndroidX support
  • v1.0.2: Added the option to offset the thumb drawables.
  • v1.0.1: Made the RangeSeekBar class, open
Comments
  • How to remove the gap between Min thumb and start of the track and also Max thumb and end of the track?

    How to remove the gap between Min thumb and start of the track and also Max thumb and end of the track?

    Hi,

    How to remove the gap between Min thumb and start of the track and also Max thumb and end of the track?

    There is a margin at the start between the Min thumb and start of track and also a margin between Max thumb and end of the track. How can I remove this?

    opened by RockySlayer 8
  • Make RangeSeekBar class open

    Make RangeSeekBar class open

    Hi, I like your library, but I have one problem. Common pattern is to extend external libraries class to encapsulate dependencies. Your class is not open so we cant extend it :/ Is this possible to open this class in next release?

    enhancement 
    opened by PawelDedio 4
  • Fix #20 - Tracks growing horizontally

    Fix #20 - Tracks growing horizontally

    Line stroke used to work differently on older Android versions. In the latest release, changing track (the line between start-end and the line between min-max selected area) thickness would cause them to also grow horizontally which was not the right behaviour.

    Drawing fill rect/roundedRect does the trick. Formatting changes are accidental and are duplicated in #21. So please ignore those

    opened by mirrajabi 1
  • Unable to attach with 2way data binding

    Unable to attach with 2way data binding

    How to set data and retrieve data in Rangeseekbar using data binding?

    I tried to set: app:rsb_initialMaxThumbValue="@{viewModel.maxPricePerMile}" app:rsb_initialMinThumbValue="@{viewModel.minPricePerMile}"

    But showing compile-time error, getter, and setter is not defined for the above attribute.

    opened by amit7127 1
  • How to set Minimum Value

    How to set Minimum Value

    How i can set minimum value same like max, For example, I want to set minimum 50 and max 100 so seek should start from 50 and goes to 100 but now below 50, so 50 should be the minimum start point in seek bar

    opened by varunjain0888 1
  • keepMinWindow() code working twice in onTouchEvent

    keepMinWindow() code working twice in onTouchEvent

    In RangeSeekBar.kt code, line 262 to 270 is in keepMinWindow(selectedThumb) line 271 calls keepMinWindow(selectedThumb) So keepMinWindow(selectedThumb) called twice.

    opened by tjsm-dev 1
  • change steps

    change steps

    hi, thanks for your good library if you add custom step decrease and increase it will be better for example, if I set steps to 50 and drag value 200 change to 250 and...

    opened by ag2m 1
  • thumbs offset usage

    thumbs offset usage

    for rsb_xxxThumbOffsetHorizontal/rsb_xxxThumbOffsetVertical why using integer value not dimension? dimen may be cast to interger in extractMinThumbOffset(a)/extractMaxThumbOffset(a) for canvas for example, if we use thumb size 24dp with 2dp padding, need to set offset for mdpi 2 pixels offset for xhdpi 4 pixels offset for xxxhdpi 8 pixels.

    Or just 2dp if we use dimen as offset value

    opened by BlackDizel 0
Releases(v1.0.4)
Owner
Innovattic
Innovattic
用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View.

PathAnimView 用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View. 现已经找到图片->SVG->PATH的正确姿势, Now i have a pic.I have a view. Oh~,Path(A

张旭童 1.1k Oct 28, 2022
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Muthuramakrishnan Viswanathan 1.2k Dec 30, 2022
Snake View is a simple and animated linear chart for Android.

Snake View Snake library is a simple and animation line chart for Android. Latest Version How to use Configuring your project dependencies Add the lib

Txus Ballesteros 339 Dec 14, 2022
[] A simple way to "badge" any given Android view at runtime without having to cater for it in layout

Android ViewBadger A simple way to "badge" any given Android view at runtime without having to cater for it in layout. Note: If your aim is to replica

Jeff Gilfelt 3k Nov 28, 2022
Android view with both path from constructed path or from svg.

android-pathview You want to animate svg or normal Paths?<br> Change the color, pathWidth or add svg.<br> Animate the "procentage" property to make th

Georgi Eftimov 2.9k Dec 27, 2022
A horizontal view scroller library for Android

View Flow for Android ViewFlow is an Android UI widget providing a horizontally scrollable ViewGroup with items populated from an Adapter. Scroll down

Patrik Åkerfeldt 1.8k Dec 29, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Dec 29, 2022
A cool Open Source CoverFlow view for Android with several fancy effects.

FancyCoverFlow THIS PROJECT IS NO LONGER MAINTAINED! What is FancyCoverFlow? FancyCoverFlow is a flexible Android widget providing out of the box view

David Schreiber-Ranner 1.1k Nov 10, 2022
A simple, customizable and easy to use swipeable view stack for Android.

SwipeStack A simple, customizable and easy to use swipeable view stack for Android. QuickStart Include the Gradle dependency dependencies { compil

Frederik Schweiger 1.5k Dec 30, 2022
Custom android music player view.

InteractivePlayerView Custom android music player view. Screen Check it on youtube Usage(XML) Define it in your xml file. <co.mobiwise.library.Intera

Mert Şimşek 744 Dec 25, 2022
Shadow layout, shadow view for android.

ShadowViewHelper Shadow layout, shadow view for android. How to use: It's very simple to use. Gradle(Check newest version): compile 'com.github.wangji

WangJie 777 Dec 30, 2022
Android Quilt View Library

QuiltViewLibrary QuiltView displays views of different sizes in a scrollable grid. Dependencies This library depends on gridlayout_v7 ([email protected]:

Jacob Moncur 561 Nov 20, 2022
A velocimeter View for Android

Velocimeter A velocimeter View for Android Sample video: Youtube Velocimeter video Sample app: How to use Default colors <com.github.glomadrian.veloci

Adrián Lomas 614 Dec 4, 2022
Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0

Path 2.0 like ScrollBarPanel for Android Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0. Features Sup

Arnaud Vallat 551 Dec 22, 2022
Android library to create chat message view easily

ChatMessageView ChatMessageView helps you to create chat message view quickly like a typical chatting application. Its a container view, so you can ad

Himanshu Soni 641 Dec 24, 2022
A drawing view for your android application.

Android Draw A drawing view for your android application Download For information : checkout Sample App Code in repository. Dependency Step 1. Add the

Divyanshu Bhargava 409 Dec 30, 2022
Customizable Item Setting View Android

ItemSettingView Simple ItemSettingView and Custom Installation Add it in your root build.gradle at the end of repositories: allprojects { reposito

Andhika Yuana 15 Aug 19, 2022
Android library implementing a poppy view on scroll, similar to the one found in the Google Plus app

PoppyView PoppyView is a library which implements view on the bottom which come and go relative to the user scroll. It can be seen in the Google plus

Flavien Laurent 409 Nov 23, 2022