Giter Site home page Giter Site logo

deepeshalways / android-range-seek-bar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anothem/android-range-seek-bar

0.0 2.0 0.0 8.29 MB

It provides a SeekBar similar to the default Android one, but with two thumb controls allowing a range to be selected, and some other extras as well.

License: Apache License 2.0

Java 100.00%

android-range-seek-bar's Introduction

range-seek-bar

Introduction

If you are coming from the original repo, you're in the right place this is the new home for this project.

The android-range-seek-bar is a fork of the following project: https://code.google.com/p/range-seek-bar/ under Apache license.

It provides a SeekBar similar to the default Android one, but with two thumb controls allowing a range to be selected, and some other extras as well.

Modifications in fork from original project

Feature additions are:

  • Ability to initialise from XML, with attributes (only tested for Integer and Double, would not support all the original types that the class supports when initialized programmatically)
  • Ability to make the range-seek-bar only use one thumb instead of two, with all other feature remaining; can be set from XML. This makes it more similar to the default android seekbar, but you still benefit from the other features and very smooth animation.
  • Text labels at beginning and end integrated in the RangeSeekBar view itself
  • Floating text above the thumbs that shows the value selected by the thumb
  • Styling changes — thinner line, the progress bar shows as “disabled” (line grey, buttons grey, no text labels) when the values are at default min/max
  • I’ve also added a PixelUtils class that does Px to Dp and Dp to Px conversions.

How to run demo

This repository contains an ant-based Android project which runs a demo app showing off some of the features of the range-seek-bar and ways of utilizing it. You should be able to import and run like any other Android app.

How to use in your own project

Setup as Gradle dependency

  • Add this in your build.gradle file:

  • For latest release:

	dependencies {
    	compile 'com.yahoo.mobile.client.android.util.rangeseekbar:rangeseekbar-library:0.1.0'
	}
  • For the latest work-in-progress snapshot:
	dependencies {
    	compile 'com.yahoo.mobile.client.android.util.rangeseekbar:rangeseekbar-library:0.2.0-SNAPSHOT'
	}

Copy/paste relevant files

Copy the following into your own project:

Then you can use this in your layouts, either programmatically instantiating like in DemoActivity or through XML, like in main.xml

License

The images are licensed under Creative Commons ( http://creativecommons.org/licenses/by/3.0/ ). The originals are provided in the original project ( https://code.google.com/p/range-seek-bar/ ) and seek_thumb_disabled.png is added by us.

The source code is licensed under the Apache License. A copy of this can be found at http://www.apache.org/licenses/LICENSE-2.0 and has been included in the repository as well.

android-range-seek-bar's People

Contributors

anothem avatar dbachelder avatar michaelkeppleretas avatar niedzielski avatar

Watchers

James Cloos avatar Deepesh Jain 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.