todd-davies / progresswheel Goto Github PK
View Code? Open in Web Editor NEWA progress wheel for android, intended for use instead of the standard progress bar.
License: MIT License
A progress wheel for android, intended for use instead of the standard progress bar.
License: MIT License
Can I use ProgressWheel in a commercial project ?
Please add getter/setter for bar Shader.
I wanted to apply a gradient to the progress bar and I needed the bar shader.
Also, why not add a Shader for every type?
public Shader getBarShader() {
return barPaint.getShader();
}
public void setBarShader(Shader shader) {
this.barPaint.setShader(shader);
}
I had some trouble applying a gradient for the bar, so here is what I did:
Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.blue_conical_gradient);
Shader shader = new BitmapShader(bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
progressBar.setBarShader(shader);
Great component! Thanks!
AndroidStudio complains on xmlns:ProgressWheel="http://schemas.android.com/apk/res/com.visualdenim.schooltraq", says
In Gradle projects, always use http://schemas.android.com/apk/res-auto for custom attributes.
Upon accepting the suggestion it works fine.
Hi,
Can anyone explain how to use this fantastic library in a home widget?
I am having problem in adding this view to the remoteView in my AppWidgetProvider.
Thanks in advance
not working as parseAttributes(context.obtainStyledAttributes(attrs,
R.styleable.ProgressWheel));
Hi. Nice to meet you. I am Akio
Please tell me, how can I fix this issue.
And I have added in gradle :
repositories {
maven { url "https://jitpack.io" }
}
Thanks.
No matter what I try, I just can't get this to work as a Gradle dependency.
Can someone tell me what I'm doing wrong?
I just get the following error:
Error:(24, 13) Failed to resolve: com.github.Todd-Davies:ProgressWheel:1.0
The repo and the dependency are both configured in my project just like any other library but this one just won't work
how to set Cancellable TRUE/False?
After I install this dependency, I'm getting some AndroidManifest issues (Android 1.2.2 - Gradle tools 1.2.3).
Error:(11, 9) Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:11:9
Error:(13, 9) Attribute application@theme value=(@style/AppTheme) from AndroidManifest.xml:13:9
is also present at com.github.Todd-Davies:ProgressWheel:1.0:14:9 value=(@android:style/Theme.NoTitleBar)
Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:8:5 to override
Hey Todd,
First off, this is an amazing library. But i can't figure out how to set the maximum value for the progress bar.
I was unable to use project as library in last Android studio 0.5.5
Without changing in build.gradle from
apply plugin: 'android'
to
apply plugin: 'android-library'
and using namespace
xmlns:ProgressWheel="http://schemas.android.com/apk/res-auto"
Hi there,
Is there any way to change the bar color in the middle of the progress?
I am using a timer and i want to change the color of the bar every tick depending on a certain algorithm
Your project is very interesting but i can't use it.
I don't understand how to use it. Can anyone explain how to install ProgressWheel ?
Thx !
When setting bounds this.getLayoutParams().width/height is used, however when user specifies the width/height as WRAP_CONTENT or MATCH_PARENT it will return a constant -1 for MATCH_PARENT or -2 for WRAP_CONTENT, which just kills it. Using getWidth() seems to work, but I haven't fully tested it yet!
hello
I tried to import this library in eclipse , I right click and import it as android project .On the properties , the "is library" is checked .
The problem is ,in the main.java and ProgressWheel.java , every "R" has this error "R cannot be resolved to a variable" . For instance , this line has the problem "R.styleable.ProgressWheel" .
What is the problem ?Why I can't import it ?
Looking to hear from you
King Regards
there seems to be large layout problems, you cant use fill_parent, wrap_content and even dp wont scale between resolutions. Client says it appears as a tiny dot for him even when ive specified 58dp, wonder whats going on ?
create an ProgressWheel and setText with \n
lines overlap
Hello. When I build gradle, it keeps showing me this error: "Attribute "radius" has already been defined". After a little research I discovered ViewPagerIndicator library also uses "radius" attribute. They conflict.
So how can I successfully build both of them?
The ProgressWheel control is only drawn when I specify height and width. If I use a linear layout, and then specify layout_weight=1 and layout_width=0dp, It is not displayed.
Example of xml : https://www.dropbox.com/s/xmxp36rbarllz5d/f.xml
Hi Todd i am very much impressed with your work.
but u didnt mentioned for specific radis of the circle.
i want radius of 100dp progress circle in increment mode how to achieve it.
i dont want any rim.
i want plain circle in increment mode
The project seems to be licensed under MIT license
but here in source file it says CC license
.
Fix / clarification on this would be great. Thanks.
What change i would like to do to make the progress wheel to fill Anti clock Wise?
I set radius, but it not work. The circle size is determined only by layout_weight and layout_height.
Would be great to have a GitHub Release of ProgressWheel
For example, if I call setBarColor( Color.parseColor("#e3a712"); in code, the bar color of the progress wheel won't visually change. The fix is quite simple, at least from the way I see it. It is basically due to barPaint object in ProgressWheel.java hasn't been updated with the new color value when setBarColor() is called.
I have copy down the code in guidence in file named attrs.xml file but it shows error
so please tell me how to make attrs.xml file.
<declare-styleable name="ProgressWheel">
<attr name="pwText" format="string" />
<attr name="pwTextColor" format="color" />
<attr name="pwTextSize" format="dimension" />
<attr name="pwBarColor" format="color" />
<attr name="pwRimColor" format="color" />
<attr name="pwRimWidth" format="dimension" />
<attr name="pwSpinSpeed" format="dimension" />
<attr name="pwDelayMillis" format="integer" />
<attr name="pwCircleColor" format="color" />
<attr name="pwRadius" format="dimension" />
<attr name="pwBarWidth" format="dimension" />
<attr name="pwBarLength" format="dimension" />
<attr name="pwContourColor" format="color" />
<attr name="pwContourSize" format="dimension" />
</declare-styleable>
xmlns:ProgressWheel="http://schemas.android.com/apk/res/com.visualdenim.schooltraq"
<com.todddavies.components.progressbar.ProgressWheel
android:id="@+id/pw_spinner"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_centerInParent="true"
ProgressWheel:pwText="Authenticating..."
ProgressWheel:pwTextColor="#222"
ProgressWheel:pwTextSize="14sp"
ProgressWheel:pwRimColor="#330097D6"
ProgressWheel:pwBarLength="60dp"
ProgressWheel:pwBarColor="#0097D6"
ProgressWheel:pwBarWidth="5dp"
ProgressWheel:pwRimWidth="2dp" />
Hi, this is a great library ๐
Can you specify the license for it? Thanks
How can I create the attributeSet manualy?
could put more examples of how to use your lib project in android?
Hi tried to apply barcolor to progress bar from java side using progreabr1.setbarcolor() method , but it's not giving any change.. the default color mentioned in library is applied..
Hello, I would like to add animation to the component. the animation would go from 0 to value, and would increase the value inside (setText) from 0 to value.
Do you have any clue on how to do it???
Tx man, you component rocks !!
If we start spin it will forever post messages to handler (to update view). Since there are always messages in queue gc won't be able to collect this handler and therefore won't collect view and context it's attached to. So the only way to avoid leak is to call stop spin manually, which is troublesome in some situations.
Maybe view should override onDetachedFromWindow to stop message posting to handler, but save state, so on the next attach it will start spinning again.
The ProgressWheel control does not draw when I specify it as :
<com.todddavies.components.progressbar.ProgressWheel
android:id="@+id/dialProgressWheel"
android:layout_width="match_parent"
android:layout_height="match_parent"
ProgressWheel:barColor="#FF0000"
ProgressWheel:barLength="5dp"
ProgressWheel:barWidth="5dp"
ProgressWheel:rimColor="#000000"
ProgressWheel:rimWidth="10dp"
ProgressWheel:text=""
ProgressWheel:textColor="#222"
ProgressWheel:textSize="14sp"
/>
Hi, thanks for this library.
Also, I have an issue...I cannot set bar to whole radius (half of diameter) like for example in this iOs app https://itunes.apple.com/hr/app/suncebeat-festival/id897082132?mt=8 ... can someone please show me how?
custom attributes like "fromDegrees=180" will be great, so we can control the increment beginning.
Hello,
I have not found a way to manually set the progress value.
Am I missing something?
I just added this:
public void setProgress(int i) {
isSpinning = false;
progress=i;
spinHandler.sendEmptyMessage(0);
}
Is there a better way to achieve this? Maybe you would like to add it the lib...
The barLength
property is conflicting with the android SDK
I am trying to tamper with bar length attribute but nothing seems to change. How does it work exactly?
(thanks for the overall good work on this widget by the way)
@Todd-Davies please publish aar to Maven Central,Thank You.
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.