All Projects → GoodieBag → Protractorview

GoodieBag / Protractorview

Licence: mit
A semicircular seekbar view for selecting angle from 0° to 180° ✨

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Protractorview

Emojislider
🤯 A slider widget rich in emoji and highly customisable.
Stars: ✭ 549 (+169.12%)
Mutual labels:  library, seekbar
Rubberpicker
Android Rubber Picker Library
Stars: ✭ 469 (+129.9%)
Mutual labels:  library, seekbar
Openlib.cs
📚 A Collection of Free & Open Resources for University Coursework in Computer Science.
Stars: ✭ 198 (-2.94%)
Mutual labels:  library
Pgsodium
Modern cryptography for PostgreSQL using libsodium.
Stars: ✭ 202 (-0.98%)
Mutual labels:  library
Ptimagealbumviewcontroller
"Image Album" — or "Photo Album" if you like that better — View( Controller) for all crazy iOS developers out there...
Stars: ✭ 199 (-2.45%)
Mutual labels:  library
Paco
Small utility library for coroutine-driven asynchronous generic programming in Python 3.4+
Stars: ✭ 198 (-2.94%)
Mutual labels:  library
Pgpickerview
PGPickerView是将UIPickerView的弯曲弧度变成直列表,可以是单列表,多列表,还可以修改选中label的字体颜色等。
Stars: ✭ 199 (-2.45%)
Mutual labels:  pickerview
Angular Library Seed
🌾 Seed project for Angular libraries that are AOT/JIT compatible and that use external SCSS-styles and HTML-templates
Stars: ✭ 197 (-3.43%)
Mutual labels:  library
Store
A beautifully-simple framework-agnostic modern state management library.
Stars: ✭ 204 (+0%)
Mutual labels:  library
Androiddevicenames
A tiny Android library that transforms the device model name into something users can understand.
Stars: ✭ 198 (-2.94%)
Mutual labels:  library
Reference Arithmetic Coding
Clear implementation of arithmetic coding for educational purposes in Java, Python, C++.
Stars: ✭ 201 (-1.47%)
Mutual labels:  library
Messenger4j
A Java library for building Chatbots on the Facebook Messenger Platform - easy and fast.
Stars: ✭ 199 (-2.45%)
Mutual labels:  library
Python Trezor
🐍 Don't use this repo, use the new monorepo instead:
Stars: ✭ 198 (-2.94%)
Mutual labels:  library
Tksubmittransition
Animated UIButton of Loading Animation and Transition Animation. Inspired by https://dribbble.com/shots/1945593-Login-Home-Screen
Stars: ✭ 2,279 (+1017.16%)
Mutual labels:  library
Aegis.cpp
Discord C++ library for interfacing with the API. Join our server:
Stars: ✭ 198 (-2.94%)
Mutual labels:  library
Navigation Stack
NavigationStack is a stack-modeled UI navigation controller. Swift UI library made by @Ramotion
Stars: ✭ 2,289 (+1022.06%)
Mutual labels:  library
Libmobi
C library for handling Kindle (MOBI) formats of ebook documents
Stars: ✭ 197 (-3.43%)
Mutual labels:  library
Duaef duik
Duduf After Effects Framework | Duik
Stars: ✭ 197 (-3.43%)
Mutual labels:  library
Beanstalk
Minimalistic PHP client for beanstalkd without any dependencies
Stars: ✭ 199 (-2.45%)
Mutual labels:  library
Onednn
oneAPI Deep Neural Network Library (oneDNN)
Stars: ✭ 2,600 (+1174.51%)
Mutual labels:  library

ProtractorView

Android Arsenal Release API

ProtractorView library for android 😾

A semicircular seekbar view for selecting an angle from 0° to 180.

alt tag alt tag

Gradle Dependency

Add this in your root build.gradle file at the end of repositories:

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

Add the dependency :

dependencies {
	   compile 'com.github.GoodieBag:ProtractorView:v1.2'
	}

Sync the gradle and that's it! 👍

Features :

  • A semi-circular seekbar widget for selecting an angle from 0° to 180°.
  • Complete customisation facilities for changing the colors of the text, tick, progress bar and thumb.
  • A special highlighting mechanism has been implemented. As the thumb passes through the angles (ticks / text), it can change the tick/text colors marking them as "traversed" to give the user a visual hint.
  • The tick length and the interval between ticks and text can also be customised.

Usage :

XML :

<com.goodiebag.protractorview.ProtractorView
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       app:thumb="@drawable/your_thumb_drawable"
       app:arcColor="#4a4a4a"
       app:arcProgressColor="#FF0000"
       app:tickColor="#4a4a4a"
       app:tickProgressColor="#abe6"
       app:textColor="#000"
       app:textProgressColor="#FF0000"
       app:angleTextSize="10sp"
       app:arcWidth="4dp"
       app:progressWidth="4dp"
       app:tickOffset="18dp"
       app:tickLength="10dp"
       app:angle="15"
       app:tickIntervals="15"
       app:ticksBetweenLabel="three"
       app:touchInside="true"
       app:roundEdges="true" />

Java :

To create the view programatically, you can do the following :

ProtractorView protractorView = new ProtractorView(this);
//This can then be added to its parent layout
layout.addView(protractorView);

Or you can reference it from your XML :

ProtractorView protractorView = (ProtractorView) findViewById(R.id.protractorview);

//use setters to style it. Every xml attribute mentioned above has a setter to support programmatical creation of the views
protractorView.setTickIntervals(15);
protractorView.setArcColor(getColor(R.color.colorAccent));
protractorView.setProgressColor(getColor(R.color.myColor));
.
.
.
//so on

There is an event listener which can be set up as follows :

protractorView.setOnProtractorViewChangeListener(new ProtractorView.OnProtractorViewChangeListener() {
           @Override
           public void onProgressChanged(ProtractorView pv, int progress, boolean b) {
           	//protractorView's getters can be accessed using pv instance.
           }

           @Override
           public void onStartTrackingTouch(ProtractorView pv) {

           }

           @Override
           public void onStopTrackingTouch(ProtractorView pv) {

           }
       });

Thanks to :

Shoutout to SeekArc.
Thanks to SeekArc by neild001 we were able to understand the drawing mechanism of the circular seekbar, which then helped us draw the semi-circular one.

LICENSE

MIT License

Copyright (c) 2017 GoodieBag

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].