Giter VIP home page Giter VIP logo

seekarc's People

Contributors

ascorbic avatar scottyab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seekarc's Issues

Setting up the Seekarc in eclipse android project

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?

SeekArc fills when progress set to 0

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.

Creating a marker at discrete progress

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

SeekArc Infinite is possible?

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

Accessing class variable inside onProgressChanged()

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?

Cannot easily drag to min or max

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...

minimize the height when use just half circle (forexample)

my application just need 120deg from the circle , but the script need the full circle diameter as a layaoutframe height as in the shape :
1
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 ??

Attribute "max" and "progress" has already been defined

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!

Disable touch events

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

2 Arcs in an Acticity

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.

Unable set max value programatically

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.

Placing Buttons inside the Arc

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.

Locking the SeekArc when 360 is reached, instead of starting from 0

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 :)

Gradient coloring for seek arc

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.

setMax / getMax unavailable

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.

SeekArc with two different color

Hello @neild001 ,
can u plz help me out
img_0292

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.

Disable

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)

About code problem

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!!

Manifest error while building project

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.

Error when sync Gradle dependency

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'
}

Reconnecting Crashes app

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?

Enable Disable SeekArc from different threads doesn't work

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

Set max programmatically

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

Using Readme example not showing

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.

How to implement??

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??

Do you guys need a hand with maintenance?

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!

Programmatically set the arc's value,

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]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.