Code Monkey home page Code Monkey logo

Comments (8)

GuilhE avatar GuilhE commented on June 13, 2024

Hello Nate,

Can you please provide some code samples and screen-shots so we can hopefully pin point the problem?
Thanks.

from circularprogressview.

n8glenn avatar n8glenn commented on June 13, 2024

sure, here is the layout:

                <com.github.guilhe.circularprogressview.CircularProgressView
                    android:id="@+id/hostUpProgress"
                    android:layout_height="match_parent"
                    android:layout_width="match_parent"
                    app:progress="55"
                    app:progressBarThickness="50dp"
                    app:progressBarColor="@color/green"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="8dp"
                    android:layout_marginBottom="0dp"
                    />

and the code in my activity:

            hostUpProgress.setReverseEnabled(false);
            hostUpProgress.setVisibility(View.VISIBLE);
            hostUpProgress.setProgressStrokeThickness(30.0f); // this doesn't seem to be having an effect
            ObjectAnimator progressAnimator = ObjectAnimator.ofFloat(hostUpProgress, "progress", 0, 100);
            progressAnimator.setDuration(1000 * FPS);
            progressAnimator.setInterpolator(new LinearInterpolator());
            progressAnimator.start();

from circularprogressview.

GuilhE avatar GuilhE commented on June 13, 2024

I'm changing by code and it works:
setProgressStrokeThickness(30.0f);
30
setProgressStrokeThickness(60.0f);
60
setProgressStrokeThickness(90.0f);
90

Regarding this:

            ObjectAnimator progressAnimator = ObjectAnimator.ofFloat(hostUpProgress, "progress", 0, 100);
            progressAnimator.setDuration(1000 * FPS);
            progressAnimator.setInterpolator(new LinearInterpolator());
            progressAnimator.start();

You can use this methods to achieve the same:

public void setAnimationInterpolator(TimeInterpolator interpolator)
public void setProgress(float progress, boolean animate, long duration)

Regards.

from circularprogressview.

n8glenn avatar n8glenn commented on June 13, 2024

Changing the thickness works for me when I use a value from 1 to 10. If I set the value higher than 10, there is no change in the appearance of the control. I did implement the code you provided to do animations and it does work as expected, but again, the bar thickness isn't getting larger than 10dp.

from circularprogressview.

GuilhE avatar GuilhE commented on June 13, 2024

https://github.com/GuilhE/android-circular-progress-view/blob/682d2fb2498ca3daf167b24047cd96455db555be/circular-progress-view/src/main/java/com/github/guilhe/circularprogressview/CircularProgressView.java#L492-L493

I've this condition inside onMeasure method. Is this condition valid in your layout?

from circularprogressview.

GuilhE avatar GuilhE commented on June 13, 2024

Any news?

from circularprogressview.

GuilhE avatar GuilhE commented on June 13, 2024

@n8glenn you haven't provide more feedback can I close this "issue"?

from circularprogressview.

n8glenn avatar n8glenn commented on June 13, 2024

I think this may be caused by the way the control is added to the layout file. I used "match_parent" instead of setting a size explicitly, this might be the reason, otherwise I have no idea why it is happening.

from circularprogressview.

Related Issues (16)

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.