TerminalSeekbar


Source link: https://github.com/alshell7/terminal-seekbar

TerminalSeekBar

A smart seek bar for android with multiple junction points at random seek position.

Installation and Usage

To use TerminalSeekBar in your layout XML, Add the library in your Project build.gradle :

allprojects {
  repositories {

...
maven {
 url 'https://jitpack.io' 
}
  
}
 
}

Add the dependency in the build.gradle (Module: app) :

dependencies {
  compile 'com.github.alshell7:terminal-seekbar:1.1' 
}

XML

 <com.projects.alshell.android.TerminalSeekBar

android:layout_width="wrap_content"

android:id="@+id/terminalSeekBar"

android:layout_height="wrap_content"/>

You can use the following properties to change your TerminalSeekBar

Properties

  • app:bar_color, format="color"
  • app:bar_height, format="dimension"
  • app:thumb_height, format="dimension"
  • app:current_value, format="integer"
  • app:background_color, format="color"
  • app:bar_margin, format="dimension"
  • app:max_value, format="integer"

Java

TerminalSeekBar terminalSeekBar = (TerminalSeekBar) findViewById(R.id.terminalSeekBar);
  //Create a list of terminals to be set on the TerminalSeekBar ArrayList<Terminal> terminals = new ArrayList<>();
  terminals.add(new Terminal(10, Color.GREEN, "...this..." , Terminal.DEFAULT_PRIORITY_NORMAL));
 terminals.add(new Terminal(100, Color.RED, "...HIGH...", Terminal.DEFAULT_PRIORITY_HIGH));
 terminals.add(new Terminal(25, Color.BLUE, "...is...", Terminal.DEFAULT_PRIORITY_NORMAL));
 terminals.add(new Terminal(70, Color.YELLOW, "...gettING...", Terminal.DEFAULT_PRIORITY_MEDIATE));
 terminals.add(new Terminal(50, Color.GRAY, "...check...", Terminal.DEFAULT_PRIORITY_HIGH));
  //Attach the terminals to the seek bar terminalSeekBar.setTerminals(terminals);
  //Change the animation of the terminals terminalSeekBar.enablePriorityBlinking(TerminalAnimationType.BLINK_ACTIVE);
  //Set event listeners of the TerminalSeekBar, or by implementing the methods in your Activity //terminalSeekBar.setTerminalChangedListener(this);
 terminalSeekBar.setTerminalChangedListener(new TerminalChangedListener() {
  @Override  public void onTerminalChanged(Terminal terminal)  {

 //Log.v(TAG, "Current Terminal : " + terminal.getInformation());
  
}
 
}
);
  terminalSeekBar.setSeekBarValueChangedListener(this);
 //Optional

Animations

The animations for Terminal are encapsulated in TerminalAnimationType.

The priority ( DEFAULT_PRIORITY_NORMAL, DEFAULT_PRIORITY_MEDIATE, DEFAULT_PRIORITY_HIGH) of the Terminal describes the blinking rate of the specific Terminal on the seek bar.

public enum TerminalAnimationType {

  BLINK_STILL,
  BLINK_ACTIVE  
}

BLINK_STILL - The Terminals are blinked only when the progress of the seek bar is being changed.
BLINK_ACTIVE - The Terminals are constantly blinked even if the progress of the seek bar is not changing.

Demo

Install the Demo app on your device for a complete view on library!

Apps using library

How to Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Copyright 2017 alshell7  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

Resources

Heimdall is an OAuth 2.0 client specifically designed for easy usage and high flexibility. It supports all grants as described in Section 4 as well as refreshing an access token as described in Section 6 of the The OAuth 2.0 Authorization Framework specification.

AEB - Android Easy Binding. Android View properties binding to the Business Objects (known as POJO).

Vitamin Saber provides resource injection for Android (@InjectResource(resId)). It is annotation processor based and will provide all the speed you need on Android by avoiding reflection.

A library to pick multiple images.

A library to easily show open source (Github) project contributors.

A library to create StepsView for Android.

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