Android Dial Picker


Source link: https://github.com/moldedbits/android-dial-picker

android-dial-picker

A custom circular rotating dial like picker for android.

Gradle

compile 'com.moldedbits.dialpicker:android-dial-picker:1.0' 

Maven

<dependency>
<groupId>com.moldedbits.dialpicker</groupId>
<artifactId>android-dial-picker</artifactId>
<version>1.0</version>
<type>pom</type> </dependency>

Implementation

Android Dial Picker, a circular custom view that works just like a rotating dial. DialView is highly customizable via xml or code. You can set direction(left,top,right,bottom), max/min ranges, interval values and colours. These custom attributes can be added and styled via XML as well as programatically.
As the dial rotates, the current value gets updated and is displayed on the screen.

Usage

  • In XML layout:
<com.moldedbits.dialpicker.DialView

android:id="@+id/dial_left"

android:layout_width="90dp"

android:layout_height="200dp"

android:layout_alignParentStart="true"

android:layout_centerInParent="true"

android:layout_marginTop="@dimen/margin_normal"

android:padding="5dp"

custom:centerPadding="50"

custom:dialDirection="LEFT"

custom:endColor="#FF8A80"

custom:intervalValueOnLine="true"

custom:leastCount="1"

custom:lineInterval="2"

custom:maxValue="24"

custom:minValue="0"

custom:paintArcColor="@color/smoke_red"

custom:paintLineColor="@color/smoke_red"

custom:paintTextColor="@color/smoke_red"

custom:startColor="#FF8A80"

custom:textSize="14"

custom:tickGapAngle="12" />
  • All customizable attributes: In attrs.xml
<declare-styleable name="DialView">

<attr name="lineInterval" format="integer" />

<attr name="maxValue" format="integer" />

<attr name="minValue" format="integer" />

<attr name="centerPadding" format="integer" />

<attr name="leastCount" format="integer" />

<attr name="tickGapAngle" format="integer" />

<attr name="textSize" format="integer" />

<attr name="intervalValueOnLine" format="boolean" />

 <attr name="dialDirection" format="enum">

 <enum name="LEFT" value="1" />

 <enum name="TOP" value="2" />

 <enum name="RIGHT" value="3" />

 <enum name="BOTTOM" value="4" />

</attr>

<attr name="startColor" format="color"/>

<attr name="endColor" format="color"/>

<attr name="paintLineColor" format="color"/>

<attr name="paintTextColor" format="color"/>

<attr name="paintArcColor" format="color"/>
  </declare-styleable>
  • Dial Value Change Listener
 dialViewLeft.setOnDialValueChangeListener(new DialView.OnDialValueChangeListener() {

 @Override

 public void onDialValueChanged(String value, int maxValue) {

  textViewLeft.setText(value+ "  : ");

 
}

}
);

Please feel free to contribute by pull request, issues or feature requests.

Resources

A easy to use social authentication android library (Facebook, Google, Twitter, Instagram).

Orin is a music player.

A simple event bus.

This library helps you to integrate Facebook and Google login and gives you the required result.

A very simple Gradle plugin (and/or a factory method) to generate version data based on environment status.

Simple custom view implementation that allows you to control the input of a numeric code

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