neild001 / seekarc Goto Github PK
View Code? Open in Web Editor NEWCircular SeekBar view for Android
License: MIT License
Circular SeekBar view for Android
License: MIT License
SetEnabled(false) is ignored.
I added a quick fix in my project by simply checking if it is enabled at updateProgress method (may not be the best solution though)
Would it be possible to add multiple seek points on the slider?
attribute and code way of disabling touch events and ideally remove the scrubber. - Great library btw, i'll send PR with this when I have a sec
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:7:9-43
is also present at [com.github.Triggertrap:SeekArc:v1.1] AndroidManifest.xml:36:9-45 value=(@drawable/ic_launcher).
Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:5:5-18:19 to override.
My Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.root5solutions.musicplayer">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.root5solutions.musicplayer"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.github.Triggertrap:SeekArc:v1.1'
testCompile 'junit:junit:4.12'
}
Right now if i click any where on circle seekbar value is changed and set to that position. How can it just be to drag seekbar by dragging thumb. Is it possible yet in this version?
my application just need 120deg from the circle , but the script need the full circle diameter as a layaoutframe height as in the shape :
total height of arc area = (min (height,width)-padding/2) >> arc diameter ..
but height 2 is not scrollable in (scroll view) .. and i dont need this area because my arc is not a full circle ..
how i can erase this (2) area .. or make it scrollable in framelayout ??
Hello @neild001 ,
can u plz help me out
I want to fill two colors in a curve. As I attached screen shot of here you can see two colors (one is gray and attached red colored line). I can draw gray curve line but not able to draw red line which is attached with gray line.
So requested you to plz tell me about fill curve with two different color.
Hey folks - not sure if an issue is precisely the right place for this, but it seems like the current SeekArc dev team is a little wrapped up with other things. :) PRs/issues are building up, and I'm wondering if perhaps another contributor or two might help to ease the load? I for one would be happy to volunteer, as I bet would a few others. Please let us know what you think? Thanks!
There is no method to get the progress of current seekbar. I just create a method i the class that returns the current progress of seekArc just like seekbar in android.
Is there any way to set the control selector drawable?
Slider animation lags and stuck if it's called inside the fragment
Hi,
I want to make an app for android 4.4 and implement the seekarc.
So I've taken these actions:
copy Seekarc into my res folder.
Either the com.triggertrap.seekarc or my own com.example.seekarktest
I copied the drawables and the xml there in a not standard present folder "drawable"
copied the png's also in xhdpi to be sure, just in case.
I copied the values, attr, colors and styles
Anyway i end up in an unbound prefix parsing error , adding
<com.example.seekarctest.SeekArc Or com.triggertrap.seekarc.SeekArc in the activity_main layout results in an unbound prefix error.
I work with eclipse, am new to android. Did my best to import your lib and project, but there's no eclipse support for running the imported gradle projects.
Could you help me out?
Dear friend:
long time ago, I was download this project for study how to draw view! but i do't understand you calculate the Thumb position at all !
int arcStart = (int)mProgressSweep + mStartAngle + mRotation + 90;
mThumbXPos = (int) (mArcRadius * Math.cos(Math.toRadians(arcStart)));
mThumbYPos = (int) (mArcRadius * Math.sin(Math.toRadians(arcStart)));
and in onDraw function:
canvas.translate.(mTranslateX - mThumbXPos,mTranslateY - mThumbYPos);
why arcStart value need add mRotation and 90 ???? if you viewed my question please tell me? thank very much!! and it is very nice to solved the diff quadrant problem!!
I have created an object of SeekArc. And if I try to set the Max value programatically like seekbar.setMax(int)
, I am getting an error saying, cannot resolve method setMax(int)
. I tried to do the same in your sample project as well and ended up in the same result. Kindly fix this as soon as possible.
I'm using both this library and MaterialSeekBarPreference
https://github.com/MrBIMC/MaterialSeekBarPreference
and there is an issue with attribute "enabled" already being defined, which result in me not being able to use this library
I am new to this forum. I apologize if this is not the right place for such questions..
My question: is there a way/workaround/whatever that will
allow me to programmatically set the arc's current value,
something like seekArc.setValue(val);
Thanks,
Gilad
[email protected]
I am attempting to set a variable x, which is contained by my class fragment. The class fragment contains a seekArc, and that seekArc's onSeekArcChangeListener. I am attempting to change variable x, which cannot be final, from inside the onProgressChanged method within the onSeekArcChangeListener. When I attempt to x.setVar() I get an error that x ==n. Does anyone have any advice on how to do this?
@ascorbic @Ross-Gibson @ScottMellors @isharq @neild001 please publish aar to Maven Central,Thank You.
Hi Neil,
thanks for the awesome work on this fantastic widget. I'm trying to adapt it to avoid more than one "full-turn". that means, when you reach 360 degrees, I want the SeekArc to get stuck in there, instead of starting again from zero. I Had no success yet.
Would you suggest any way to approach this requirement? any ideas or pseudo-code that comes in your mind?
If I find an elegant solution, i'll define a new attribute like lockFullTurn
or similar, and send you a PR
Thanks in advance :)
Disconnecting an open device and then reconnecting the same device to the tablet crashed the application. Doesn't anyone know of a way to automatically close/disconnect the usb device and automatically open/connect the usb device?
It appears as though if a button is placed inside the seekArc then it becomes inaccessible.
I am using the Frame layout to place an ImageButton inside of a seekArc.
Changing the seekArc's touchInside attribute does not affect this functionality, and the issue persists.
seekArc.setProgressColor(int) not changed progress color as expected.
Good morning,
I wonder if you can make infinite SeekArc?
For example, it would be 0-100, but the value was not reset when you arrive at 100 instead went to 101 and so on.
I thank you for the help
Hello dear friend!
I have this error:
Myproject\app\build\intermediates\res\merged\debug\values\values.xml
Error:(128) Attribute "progress" has already been defined
Error:(128) Attribute "max" has already been defined
Please fix this!
I have followed the readme exactly to make the additions to my build.gradle files, synced and made the a layout with the additions:
xmlns:seekarc="http://schemas.android.com/apk/res-auto"
and
<com.triggertrap.seekarc.SeekArc
android:id="@+id/seekArc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="30dp"
seekarc:rotation="180"
seekarc:startAngle="30"
seekarc:sweepAngle="300"
seekarc:touchInside="true" />
Which are nested in a cardview however absolutely nothing shows up. I have tried going through the readme completely several times now and can't figure out why.
Thanks for the excellent library ๐ I guess you don't have much time for maintenance, so I'm just creating this issue here to reference it in an upcoming pull request.
Issue:
When dragging the handle to the start or end points, progress is not always set to zero or max, leaving a small offset. Usually happens when initial value is not min/max. In this case, I need to retry a couple of times, dragging slowly trying to get the right position...
Am looking to create an image marker at a different points of the arc...could you give some assistance.
am using the seek bar as a plotter showing where different users left their thumb.
also when creating the seekArc via code the setThumb method is available
Hello guys!
I'm really not sure if this is a real issue, but is it possible, that the seekArc faces issues, when I call setEnabled(true) from one Thread and then setEnabled(false) from another? I try to disable the seekArc initially and the enable it on a button press, but it seems like this call is just ignored. Even if it tried to runOnUiThread(new Runnable() {...});
Does anyone have an idea about this? I appreciate any help!
Robert Nickel
I have a SeekArc with a rotation and sweep-angle, like in the example. When the progress is set to 0, the arc should be empty, but instead it fills completely, even past where the seep angle ends. This is only happening on my Galaxy S7 running Android 6.0.1.
You can set the color in the xml, great. But changing it in code would be epic. Great library btw, i'll send PR with this when I have a sec
I followed the instructions, but I couldn't build the project.
dependencies { implementation 'com.github.mreram:SeekArc:v1.6' }
When I build a project, I get this error. AS 3.4
Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:12:13-47 is also present at [com.github.mreram:SeekArc:v1.6] AndroidManifest.xml:36:9-45 value=(@drawable/ic_launcher). Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:10:5-24:19 to override.
Is there a way to make elliptic shape of a stronke (not a perfect circle)? Thanks in advance!
Hi, can it support the -100100? minmax and setValuePerStep
Hi there,
Thank you for such a nice library. Is't possible for you to add an option to set and get min value for slider .?
Hi ,
Thanks a lot for this wonder full work. I was understanding your seek Arc Library and tried to make 2 Seek Arcs facing each other in an Activity . One Clockwise and other anticlockwise with following code in xml
<com.triggertrap.seekarc.SeekArc
android:id="@+id/circularSeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:padding="30dp"
app:arcColor="#000000"
app:clockwise="true"
app:progressColor="#FF6600"
app:rotation="180"
app:startAngle="0"
app:sweepAngle="360"
app:thumb="@drawable/mobile_portrait_l" />
<com.triggertrap.seekarc.SeekArc
android:id="@+id/circularSeekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:padding="30dp"
app:arcColor="@android:color/holo_red_dark"
app:clockwise="false"
app:progressColor="#FF6600"
app:rotation="180"
app:startAngle="0"
app:sweepAngle="360"
app:thumb="@drawable/rotated_r_large" />
Now since they have a common centre and by using them in a frame layout the circles coincides.
But when i try to seek the the left circle i am not able to do so. After debugging i found that when i try to seek left circle it calculates the progress angle of the right (anti clockwise) circle and thus gives the wrong progress angle. This happens even if i take the 2 arcs facing each other.
Please provide a solution for this.
The methods setMax and getMax are unavailable when adding this library to the project remotely using Gradle. I had to download a zip of the master and add the library manually as a module dependency to access these methods.
I added exactly what it says to add in the readme, but I get this when I try to compile:
"Caused by: java.lang.ClassNotFoundException: Didn't find class "com.triggertrap.seekarc.SeekArc" on path: DexPathList[[zip file "/data/app/com.(package name etc)"
Surely there must be another step??
Hi! Thank you for your great work, its great. I have one question, how can I set seekarc:max="value" programmatically? to set it dynamically. Thank you
There is already a port but it's outdated.
I got android code but i want same code in objective c or swift.
Please help.
please delete it from library
and clear manifest
I can set the minimum value in program but the arc sets its progress to that minimum value instead of showing it at starting angle.
I would also like to increment the progress by 20 units instead of 1 which is by default.
Hi
I need to color the seek arc. Using the Linear gradient.
mProgressPaint.setShader(new LinearGradient(0, 0, 0, getHeight(), new int[]{blue, green,red} ,new float[]{0,0.5f,1},Shader.TileMode.MIRROR));
The above piece of code is not displaying the gradient properly, need blue in the beginning, green in middle and red at the end.Colors are distributes un-evenly.
Any help is much appreciated.
methods set/getThumbDrawable for flexible to change thumb in java code any time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.