Comments (11)
I'm not sure to understand what you want to do. Do you want to simply add a background? If yes, you can add a background to your ProgressBar (you will probably have to clip it though)
from smoothprogressbar.
Hey thanks for the reply, I've asked this question on stack overflow if you'd like to take a look
http://stackoverflow.com/questions/23019072/how-would-i-use-a-gradient-drawable-to-paint-this-canvas
I'm trying to make the solid colors in the indeterminate progress bar gradients, by using a gradient drawable, and I'm not sure how to make it work or if it would actually work.
Here is an example gif: http://bit.ly/1hyG5TF
from smoothprogressbar.
Are you talking about the generated background or the moving lines?
from smoothprogressbar.
The moving lines
from smoothprogressbar.
I'm thinking that something like this might work:
int x1 = 0, y1 = 0, x2 = 100, y2 = 40;
Shader shader = new LinearGradient(x1, y1, x2, y2, Color.WHITE, Color.BLACK,
TileMode.CLAMP);
Paint paint = new Paint();
paint.setShader(shader);
canvas.drawRect(new RectF(x1, y1, x2, y2), paint);
from smoothprogressbar.
Do you mean something like this? https://www.youtube.com/watch?v=R8y7f10F5lc
from smoothprogressbar.
Wow amazing reply! was not expecting that, sadly no that's not what I'm looking for but it's close, is there any way of having the gradient move along the line?
Like shown in this gif: http://bit.ly/1hyG5TF
from smoothprogressbar.
If it's not possible to have it move along the line could you please let me know how you got the gradient background shown in your video (https://www.youtube.com/watch?v=R8y7f10F5lc). I'm going to try using a transition drawable.
from smoothprogressbar.
Oh yes, now I see. I'll try to have a look this week end
from smoothprogressbar.
I've actually had some luck using the shimmer library just by creating a custom font and overlaying it on top. It would be really cool to see some of of integration between the two libraries for that nice "shimmery" loading style.
Thanks again for the help!
TLDR; Gradient loading bars are the future :)
from smoothprogressbar.
Added in 97ea329
from smoothprogressbar.
Related Issues (20)
- Unable to update to CircularProgressBar 1.3.0 HOT 3
- how to set the color of the Circularprogressbar HOT 2
- Not able to build HOT 1
- Can't convert to dimension: type=0x1 HOT 1
- Determinate Mode HOT 1
- Increase the Storke Width HOT 1
- Caused by android.content.res.Resources$NotFoundException
- Error inflating class fr.castorflex.android.circularprogressbar.CircularProgressBar on AS 3.2.1
- Google Play Store link do not work HOT 2
- Df
- Support Android X HOT 1
- Gui
- Is this library deprecated because of not supporting AndroidX or someother reason is there? HOT 1
- JCenter replacement HOT 3
- Started lagging on Samsung phones HOT 1
- Release 1.4
- Determinate style for Horizontal HOT 1
- How to set background to transparent if used as non-intermediate progress bar HOT 1
- Not working after upgrading to api level 26 with android studio 3.0: Error inflating class fr.castorflex.android.circularprogressbar.CircularProgressBar HOT 10
- is it possible to use Smooth Progressbar in a Notification HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smoothprogressbar.