Git Product home page Git Product logo

yalandingtw / rangeseekbar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jay-goo/rangeseekbar

0.0 2.0 0.0 800 KB

 A beautiful SeekBar that supports bidirectional range selection and normal SeekBar mode, supports scale, negative numbers and a variety of powerful custom properties ( 一款漂亮美观的支持双向范围选择和普通SeekBar模式的SeekBar,支持刻度、负数以及多种强大的自定义属性)

License: Apache License 2.0

Java 100.00%

rangeseekbar's Introduction

RangeSeekBar

image

Attributes

attr format description
min float min value, Float.MIN_VALUE <= min < max,Default:0
max float max value, min < max <= Float.MAX_VALUE, Default: 100
reserve float The minimum distance between two buttons
cells int Cells equal to 0 for the normal mode, greater than 1 to switch to scale mode
progressHintMode enum the progress hint mode. defaultMode: show hint when you move the thumb;alwaysHide: hide progress hint all the time;alwaysShow: show progress hint all the time.
lineColorSelected color The Seekbar color after dragging
lineColorEdge color The default Seekbar color
thumbPrimaryColor color The color of the thumb when the progress is the minimum or maximum,default:none
thumbSecondaryColor color The color of the thumb when the progress is not the minimum or maximum,default:none
markTextArray reference Scale text, do not set the default when hidden
thumbResId reference Button background resources, do not set the default when the circular button
progressHintResId reference Progress prompt background resources, you must use the 9 path file
textPadding dimension The distance between the scale text and the progress bar
textSize dimension Scale text, and the size of the progress prompt text
hintBGHeight dimension The height of the progress prompt background, not set according to the text size adaptive
hintBGWith dimension The with of the progress prompt background, not set according to the text size adaptive
hintBGPadding dimension The progress indicates the distance between the background and the progress bar
seekBarHeight dimension The height of the progress bar
thumbSize dimension The size of the button
cellMode enum Scale mode number according to the scale of the actual proportion of the distribution of the location (markTextArray must be a number) other bisects the current layout*(markTextArray can be any character)*
seekBarMode enum One-way, two-way mode single like normal seekbar range Bidirectional selection SeekBar

Usage

Step1:

    allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
	
	dependencies {
	        compile 'com.github.Jay-Goo:RangeSeekBar:v1.1.0'
	}
   

Step2:

    <com.jaygoo.widget.RangeSeekBar
        android:id="@+id/seekbar1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:markTextArray="@array/markArray"
        app:lineColorSelected="@color/colorAccent"
        app:thumbResId="@drawable/seekbar_thumb"
        app:lineColorEdge="@color/colorSeekBarDefault"
        app:cellMode="number"
        app:seekBarMode="range"
    />

[Update]

version message
v1.0.1 add thumbPrimaryColor、thumbSecondaryColor Attributes
v1.0.2 fix Scroll conflict and make padding attributes efective
v1.0.3 fix bugs when range is 0 ~ 1
v1.0.6 config jitPack to make you can see real source(why is 1.0.6 ? god knew it……)
v1.0.7 set the seekbar gravity center to make the layout easier
v1.0.8 fix issue #2, #3
v1.1.0 add progressHintMode and some color attrs setter

Others

I hope you like this RangeSeekBar. Star is the greatest support for me! Thank U

rangeseekbar's People

Contributors

jinjiegu avatar

Watchers

James Cloos avatar Yalan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.