ValueBar


Source link: https://github.com/PhilJay/ValueBar

ValueBar

A beautiful Android custom View that works similar to a range or seekbar. Selection by gesture. With animations. Supporting API level 11+.

Demo

For a short demonstration, please download the demo application from the Google PlayStore. The corresponding code for the demo application can be found in the ValueBarExample folder.

Usage

For using ValueBar, there are various possibilities:

1. Gradle dependency

  • Add the following to your build.gradle:
repositories {

  maven {
 url "https://jitpack.io" 
}
 
}
  dependencies {

  compile 'com.github.PhilJay:ValueBar:v1.0.2' 
}

2. Maven

  • Add the following to your pom.xml:
<repository>

  <id>jitpack.io</id>

  <url>https://jitpack.io</url> </repository>  <dependency>

  <groupId>com.github.PhilJay</groupId>

  <artifactId>ValueBar</artifactId>

  <version>v1.0.2</version> </dependency>

3. jar file

  • download the latest .jar file from the release-section and copy it into the libs folder of your Android application project.

4. clone repo

  • clone this repository and add the library folder to your Android application project

Create a ValueBar in .xml:

<com.philjay.valuebar.ValueBar

android:id="@+id/valueBar"

android:layout_width="match_parent"

android:layout_height="60dp"

android:layout_margin="5dp" /> 

or in code, and then add it to a layout:

 ValueBar bar = new ValueBar(Context);

Apply styling, and display values:

 bar.setMinMax(0, 1000);
  bar.setInterval(1f);
 // interval in which can be selected  bar.setDrawBorder(false);
  bar.setValueTextSize(14f);
  bar.setMinMaxTextSize(14f);
  bar.setValueTextTypeface(...);
  bar.setMinMaxTextTypeface(...);
  bar.setOverlayColor(...);

 // create your custom color formatter by using the BarColorFormatter interface  bar.setColorFormatter(new RedToGreenFormatter());

 // add your custom text formatter by using the ValueTextFormatter interface  bar.setValueTextFormatter(...);

bar.setValue(800f);
 // display a value
 // or animate from a specific value to a specific value  bar.animate(from, to, animationDuration);

bar.setValueBarSelectionListener(...);
 // add a listener for callbacks when touching 

Donations

If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Your donation is highly appreciated.

PayPal

Resources

Android application compatible with ZX2C4's Pass command line application.

Highly flexible Android Camera which offers granular control over the video quality and file size, while restricting recordings to be landscape only.

MvpCleanArchitecture is a sample project using Clean architecture and MVP.

Adroit is a smart way to develop android applications. Enhance your application development skills by providing safe checks and speed up development process.

IconicDroid is a custom Android Drawable which allows to draw icons from several iconic font.

Sometimes we want/need to know what's going on behind the scenes but our app is not always connected to our computer to let us check the logs. Galgo will let you display your log messages as an overlay on top of your UI.

Extremely useful for testers who want to have more insight into what's going on behind the scenes in our apps when it misbehaves.

You can also define some basic settings such as background color, text color, text size and number of lines to display on screen so it better fits your needs.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes