Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A circular seekbar for Android, with a control knob! (for the lack of a better word).

License

NotificationsYou must be signed in to change notification settings

harjot-oberai/Croller

Repository files navigation


PlatformAPILicense: MIT

Usage

Just add the following dependency in your app'sbuild.gradle

dependencies {      compile'com.sdsmdg.harjot:croller:1.0.7'}

XML

<com.sdsmdg.harjot.crollerTest.Crollerandroid:id="@+id/croller"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_centerInParent="true"app:back_circle_color="#EDEDED"app:indicator_color="#0B3C49"app:indicator_width="10"app:is_continuous="true"app:label_color="#000000"app:main_circle_color="#FFFFFF"app:max="1000"app:progress_primary_color="#0B3C49"app:progress_secondary_color="#EEEEEE"app:start_offset="45" />

Java

Crollercroller = (Croller)findViewById(R.id.croller);croller.setIndicatorWidth(10);croller.setBackCircleColor(Color.parseColor("#EDEDED"));croller.setMainCircleColor(Color.WHITE);croller.setMax(50);croller.setStartOffset(45);croller.setIsContinuous(false);croller.setLabelColor(Color.BLACK);croller.setProgressPrimaryColor(Color.parseColor("#0B3C49"));croller.setIndicatorColor(Color.parseColor("#0B3C49"));croller.setProgressSecondaryColor(Color.parseColor("#EEEEEE"));

Listeners

Progress Change Listener (if you only want to use the progress)

Crollercroller = (Croller)findViewById(R.id.croller);croller.setOnProgressChangedListener(newCroller.onProgressChangedListener() {@OverridepublicvoidonProgressChanged(intprogress) {// use the progress            }        });

Croller Change Listener (if want start and stop tracking as well, similar to seekbar)

Crollercroller.setOnCrollerChangeListener(newOnCrollerChangeListener() {@OverridepublicvoidonProgressChanged(Crollercroller,intprogress) {// use the progress            }@OverridepublicvoidonStartTrackingTouch(Crollercroller) {// tracking started            }@OverridepublicvoidonStopTrackingTouch(Crollercroller) {// tracking stopped            }        });

Attributes


XML AttributeJava set methodFunctionality
anticlockwisesetAntiClockwise(boolean anticlockwise)Set the direction of rotation
progresssetProgress(int progress)Set the current progress of the seekbar
labelsetLabel(String str)Set the label
label_sizesetLabelSize(int size)Set the label size
label_colorsetLabelColor(int color)Set the label color
is_continuoussetIsContinuous(boolean bool)Set whether seekbar is conitnuous or discrete
maxsetMax(int max)Set the maximum value of the seekbar
minsetMin(int min)Set the minimum value of the seekbar (Default is1)
start_offsetsetStartOffset(int offset)Set the seekbar start offset angle from bottom horizontal center
sweep_anglesetSweepAngle(int angle)Set the total angle covered by the seekbar
progress_primary_stroke_widthsetProgressPrimaryStrokeWidth(float width)Set the primary progress thickness for continuous type
progress_secondary_stroke_widthsetProgressSecondaryStrokeWidth(float width)Set the secondary progress thickness for continuous type
progress_primary_circle_sizesetProgressPrimaryCircleSize(float size)Set the primary progress circle size for discrete type
progress_secondary_circle_sizesetProgressSecondaryCircleSize(float size)Set the secondary progress circle size for discrete type
indicator_widthsetIndicatorWidth(float width)Set the progress indicator width
indicator_colorsetIndicatorColor(int color)Set the progress indicator color
progress_primary_colorsetProgressPrimaryColor(int color)Set the progress primary(active) color
progress_secondary_colorsetProgressSecondaryColor(int color)Set the progress secondary(inactive) color
progress_radiussetProgressRadius(float radius)Set the radius of the progress arc
main_circle_radiussetMainCircleRadius(float radius)Set the main(front) circle radius
back_circle_radiussetBackCircleRadius(float radius)Set the back circle radius
main_circle_colorsetMainCircleColor(int color)Set the main(front) circle color
back_circle_colorsetBackCircleColor(int color)Set the back circle color

Examples

is_continuous = false

is_continuous = true

License

Croller is licensed underMIT license. Viewlicense.

About

A circular seekbar for Android, with a control knob! (for the lack of a better word).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp