Giter Club home page Giter Club logo

arcprogressstackview's Introduction


Devlight


ArcProgressStackView

Present your progress bars in arc mode with information and total control.

Android Arsenal       Android       Download       License       Codacy

You can check the sample app here.

Warn

This library is not more supported. 
If you want to add new feature or fix a bug, grab source code and do it. 
If you think your fix or feature would be useful to other developers, 
I can add link of your repository to this README file. 
Thank you for using our libraries.

Download

You can download a .aar from GitHub's releases page.

Or use Gradle:

compile 'devlight.io:arcprogressstackview:1.0.4'

Or Maven:

<dependency>
  <groupId>devlight.io</groupId>
  <artifactId>arcprogressstackview</artifactId>
  <version>1.0.4</version>
  <type>pom</type>
</dependency>

Or Ivy:

<dependency org='devlight.io' name='arcprogressstackview' rev='1.0.4'>
  <artifact name='$AID' ext='pom'></artifact>
</dependency>

Android SDK Version

ArcProgressStackView requires a minimum SDK version of 8, but if you want animation and shadow support it requires a minimum SDK version of 11.

Sample

Parameters

For APSV you can set such parameters as:

  • models:
    allows you to set APSV models, where you set title, progress and colors. Can be set up only via code.

  • animation:
    allows you to animate progress with func call or with touch event.

  • shadow:
    allows you to add shadow to your progress models, but remember, the shadow need LAYER_TYPE_SOFTWARE, so it decrease FPS.

  • round corners:
    allows you to set round corners to models.

  • drag/seek:
    allows you to make your progress model seek like.

  • typeface:
    allows you to set custom typeface.

  • text color:
    allows you to set text(title and progress indicator) color.

  • shadow distance:
    allows you to set shadow distance.

  • shadow angle:
    allows you to set shadow angle.

  • shadow radius:
    allows you to set shadow radius.

  • shadow color:
    allows you to set shadow color.

  • animation duration:
    allows you to set animation duration.

  • animation listener:
    allows you to set animation listener.

  • interpolator:
    allows you to set interpolator to animation.

  • draw width:
    allows you to set draw width in fraction mode(e.g. 55%) or dimension mode.

  • model offset:
    allows you to set model offset(positive or negative).

  • model background:
    allows you to set model background track from start angle to sweep angle.

  • start angle:
    allows you to set start angle of models.

  • sweep angle:
    allows you to set sweep angle of models.

  • progress indicator orientation:
    allows you to set progress indicator orientation.

  • preview colors:
    allows you to set preview colors, which generate count of models equals to count of colors.

  • preview background:
    allows you to set models background preview color.

Tips

All angle variables can only be positive and be in range from 0 to 360 degrees.
The size of View automatically set up in square mode.

Init

Check out in code init:

final ArrayList<ArcProgressStackView.Model> models = new ArrayList<>();
models.add(new ArcProgressStackView.Model("Circle", 25, bgColors[0], mStartColors[0]));
models.add(new ArcProgressStackView.Model("Progress", 50, bgColors[1], mStartColors[1]));
models.add(new ArcProgressStackView.Model("Stack", 75, bgColors[2], mStartColors[2]));
models.add(new ArcProgressStackView.Model("View", 100, bgColors[3], mStartColors[3]));

final ArcProgressStackView arcProgressStackView = (ArcProgressStackView) findViewById(R.id.apsv);
arcProgressStackView.setModels(models);

Other methods check out in sample.

And XML init:

<devlight.io.library.ArcProgressStackView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:apsv_rounded="true"
    app:apsv_shadowed="true"
    app:apsv_animated="true"
    app:apsv_dragged="true"
    app:apsv_leveled="true"
    app:apsv_typeface="fonts/agency.ttf"
    app:apsv_text_color="#fff"
    app:apsv_shadow_distance="5dp"
    app:apsv_shadow_angle="90"
    app:apsv_shadow_radius="10dp"
    app:apsv_shadow_color="#000"
    app:apsv_animation_duration="1000"
    app:apsv_interpolator="@android:anim/bounce_interpolator"
    app:apsv_draw_width="75%"
    app:apsv_model_offset="5dp"
    app:apsv_model_bg_enabled="true"
    app:apsv_start_angle="270"
    app:apsv_sweep_angle="360"
    app:apsv_indicator_orientation="vertical"
    app:apsv_preview_colors="@array/default_preview"
    app:apsv_preview_bg="#ccc"/>

Getting Help

To report a specific problem or feature request, open a new issue on Github.

Credits

Ron Evgeniy Virgil Pana Gleb Kuznetsov

Author

Created by Basil Miller - @gigamole

Company

Facebook     Twitter     LinkedIn

Created by Basil Miller - @gigamole

Here you can see open source work developed by Devlight LLC.
This and another works is an exclusive property of Devlight LLC.

If you want to use this library in applications which will be available on Google Play, please report us or author of the library about it.

Whether you're searching for a new partner or trusted team for creating your new great product we are always ready to start work with you.

You can contact us: [email protected] or [email protected].
Thanks in advance.

Devlight LLC, 2016
devlight.io

arcprogressstackview's People

Contributors

cidermole avatar gigamole avatar inaseem avatar kgilmer avatar khokharnikunj8 avatar luca020400 avatar ravidsrk 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

arcprogressstackview's Issues

ArcProgressStackView in HorizontalScrollView?

Hey

First of all, awesome library! I want to use the ArcProgressStackView in a HorizontalScrollView (in the end I want to dynamically add multiple ArcProgressStackViews programmatically) but I can't seem to make it work even via xml.

Here's what I tried:

    <HorizontalScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="40">

            <com.gigamole.library.ArcProgressStackView
                android:id="@+id/arc0"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/double_space_horizontal_margin"
                android:layout_marginStart="@dimen/double_space_horizontal_margin"
                android:layout_marginRight="@dimen/double_space_horizontal_margin"
                android:layout_marginEnd="@dimen/double_space_horizontal_margin"
                android:layout_marginTop="@dimen/double_space_vertical_margin"
                android:layout_marginBottom="@dimen/double_space_vertical_margin"
                app:apsv_shadowed="true"
                app:apsv_shadow_distance="1dp"
                app:apsv_shadow_radius="2dp"
                app:apsv_animated="true"
                app:apsv_animation_duration="2000"
                app:apsv_dragged="false"
                app:apsv_text_color="@color/colorConsumer"
                app:apsv_draw_width="15%"
                app:apsv_model_bg_enabled="true"
                app:apsv_start_angle="135"
                app:apsv_sweep_angle="270"
                app:apsv_indicator_orientation="horizontal"/>

    </HorizontalScrollView>

And just nothing is shown or at least no ArcProgressStackView.

Thanks in advance for your help.

Cheers

percentage and performance problems

Hello
Is there any way to not show the symbol that indicates the percentage in each circle of the graph?
I would also like to comment that I have serious performance problems when I use the following attributes:
apsv_shadowed="true"
apsv_shadow_distance
apsv_shadow_angle
apsv_shadow_radius
apsv_shadow_color

On a tablet nexus 9 with Android 7.1: High battery consumption and system slowdown, especially when using fragments (with two or three fragments is enough to have those problems).
Congratulations for your library and sorry for my bad English.
thanks, regards.

Change Display of %

I can set the Title of Arc but if use this with Temperatures i can't change the % of percentage with °, please add this function =)

ArcProgressStackView is being redrawn constantly

Whenever there is ArcProgressStackView with Model attached to it, it's being constantly redrawn. And one of my devices' log is flooded with messages like this:

D/Surface: Surface::setBuffersDimensions(this=0x7faee0d400,w=1080,h=1920)

This can be seen even in example app.
However, on other devices there's no such messages but if you enable 'hardware layers updates' or 'gpu view updates' in developer options, you'll see exactly the same thing - ArcProgressStackView is flashed all the time.

How to make ArcProgressStackView responsive to multiple screens size?

Hi, Thanks for this awesome library.
My question is how can I make it wrap content for my usage am using a half circle shaped ArcProgressStacView but it is eating space for a full circle. And when am hardcoding its size on some smaller screen devices it is cutting at the edges. Will you please help me out here?
Thanks

Error in AndroidManifest without merge rules

My app manifest has tags

    <application
        <!--...-->
        android:allowBackup="false"
        android:supportsRtl="false">

and ArcProgressStackView's manifest has theirs too, but with true values.

So i am receiving an gradle error when just add compile 'devlight.io:arcprogressstackview:1.0.4' as you describe in README.md.

It may be fixed by adding few words about tools:node="replace" in your readme file or just removing all values from <application> manifest's tag of this awesome library.

P.S. It would be nice, that your library run out from-the-box without any mistakes.
Thank you!

help..

I want to add this library in my project but when i added dependency it give me error so please can u tell me where i have to write this i think i am adding in a wrong way.. reply as soon as possible

Possible bug with app:apsv_model_offset="10dp"

When set app:apsv_model_offset="10dp" the circles get cut by the edges of the view, the solution is in the line 827 of the ArcProgressStackView.java

Change
final float modelOffset = (mProgressModelSize * i) +
(paintOffset + shadowOffset) - (mProgressModelOffset * i);

With
final float modelOffset = (mProgressModelSize * i) +
(paintOffset + shadowOffset) + (mProgressModelOffset * i);

if you put + (mProgressModelOffset * i); works perfectly

Hope this help
Best Regards

I cant see the preview of the arc

I cant see the preview of the arc when the app is pushed to device.
I can see the preview in the android studio but while run time it shows nothing to me

Im not sure if i have added everything that is need ,
I just added the library through gradel and copied the xml part and tried to run but it shows nothing...

ArcProgressStackView.animateProgress() to animate only a specific model

Hi,
I am currently using 2 models and tracking two different values. I noticed that once I change the value on one of the model and call animateProgress(), both of them animate. I had a look at the demo app for some guidance, but couldn't find anything relevant. Is it possible to have a model.animateProgress() or animateProgress(model)?

Note: If I don't call the animateProgress, they work fine and each updates independently.

Also this is an awesome library 👍
Thanks

version 1.0.5

Hello,

I would like to ask if you plan to release version 1.0.5 any time soon, as I see a few useful commits in master branch.

Thanks,
Manos

animateProgress problem when receiveing a broadcast

There is a service in my app that contains an Asynctask that sends a broadcast during onProgressUpdate. I want to show the progress in an ArcProgressStackView in a fragment that receives the broadcast. The problem is that the progress bar is updated but it doesn't show the animation during the update between an updated number to another. As a note, If I don't send the broadcast, the progress bar, of course, doesn't show the progress, but the animation is shown from 0 immediately to 100 after analysis finished. I mean it seems that updating the progress bar from a service by a broadcast receiver is affecting on the animation.

Would you please let me know what I am missing?

NPE shows up when initializing component

I am using ArcProgressiveStackView in two different fragments. In the first one everything works fine, but in the second one I get this stacktrace when my view is initialized :

12-18 11:04:09.093 4184-4184 W/System.err: java.lang.NullPointerException
12-18 11:04:09.093 4184-4184 W/System.err: at android.graphics.Typeface.nativeCreateFromAsset(Native Method)
12-18 11:04:09.093 4184-4184 W/System.err: at android.graphics.Typeface.createFromAsset(Typeface.java:149)
12-18 11:04:09.093 4184-4184 W/System.err: at devlight.io.library.ArcProgressStackView.setTypeface(ArcProgressStackView.java:594)
12-18 11:04:09.093 4184-4184 W/System.err: at devlight.io.library.ArcProgressStackView.(ArcProgressStackView.java:212)
12-18 11:04:09.093 4184-4184 W/System.err: at devlight.io.library.ArcProgressStackView.(ArcProgressStackView.java:179)
12-18 11:04:09.093 4184-4184 W/System.err: at java.lang.reflect.Constructor.constructNative(Native Method)
12-18 11:04:09.093 4184-4184 W/System.err: at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
12-18 11:04:09.093 4184-4184 W/System.err: at android.view.LayoutInflater.createView(LayoutInflater.java:595)
12-18 11:04:09.093 4184-4184 W/System.err: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
12-18 11:04:09.093 4184-4184 W/System.err: at android.view.LayoutInflater.rInflate(LayoutInflater.java:756)
12-18 11:04:09.093 4184-4184 W/System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
12-18 11:04:09.093 4184-4184 W/System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-18 11:04:09.093 4184-4184 W/System.err: at <...>.MyFragment.onCreateView(MyFragment.java:37)

This is not causing any issues for me, but I am not using the text labels that may be impacted by this error. My fonts are located under res/font.

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.