tangqi92 / waveloadingview Goto Github PK
View Code? Open in Web Editor NEWAn Android library providing to realize wave loading effect.
An Android library providing to realize wave loading effect.
如何修改水波底部颜色为渐变色
Hi.
I need to change the width and height of the square waves but I can't.
For example, if I set the layout_width to 30dp and layout_height to 100dp,
the square is drawn the square which has 30dp width and height, not 30dp width and 100dp height.
Is there any way to set the width and height?
Thanks for your work. ^_^
跳转Activity时候,动画控件会卡一下,不知为何
您好请问一下我想在波浪上方添加一个图片随着波浪上下浮动,请问有什么思路吗?
setAnimDuration doesn't change the animation duration as there is a hardcoded duration of 1000 set inside setProgressValue. Please update.
I want to fill the wave initially from bottom to top, not the opposite way (as it is currently doing)
你好如何修改波浪的起伏方向改为从右到左
I want custom font title. please help me!!
Hi,
I cant use WaveLoadingView with NestedScroll.
please help me
java.lang.IllegalArgumentException: java.lang.ClassCastException@315ebef1
at sun.reflect.GeneratedMethodAccessor314.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at android.animation.PropertyValuesHolder_Delegate.callMethod(PropertyValuesHolder_Delegate.java:108)
at android.animation.PropertyValuesHolder_Delegate.nCallFloatMethod(PropertyValuesHolder_Delegate.java:145)
at android.animation.PropertyValuesHolder.nCallFloatMethod(PropertyValuesHolder.java)
at android.animation.PropertyValuesHolder.access$400(PropertyValuesHolder.java:38)
at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setAnimatedValue(PropertyValuesHolder.java:1359)
at android.animation.ObjectAnimator.animateValue(ObjectAnimator.java:989)
at android.animation.ValueAnimator.setCurrentFraction(ValueAnimator.java:612)
at android.animation.ValueAnimator.setCurrentPlayTime(ValueAnimator.java:578)
at android.animation.ValueAnimator.start(ValueAnimator.java:1001)
at android.animation.ValueAnimator.start(ValueAnimator.java:1010)
at android.animation.ObjectAnimator.start(ObjectAnimator.java:852)
at android.animation.AnimatorSet.start(AnimatorSet.java:678)
at android.animation.AnimatorSet.onChildAnimatorEnded(AnimatorSet.java:807)
at android.animation.AnimatorSet.start(AnimatorSet.java:640)
at me.itangqi.waveloadingview.WaveLoadingView.setProgressValue(WaveLoadingView.java:564)
at me.itangqi.waveloadingview.WaveLoadingView.init(WaveLoadingView.java:171)
at me.itangqi.waveloadingview.WaveLoadingView.(WaveLoadingView.java:137)
at me.itangqi.waveloadingview.WaveLoadingView.(WaveLoadingView.java:132)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:475)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:262)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:220)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:186)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:334)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:345)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:245)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:324)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:368)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:567)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:549)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:863)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:549)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$1(RenderTask.java:680)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Great View, definitely am going to use it. But is there a way to stop animating or just frees waves or just to level "the water" without waves.
Again great work,
Omer
sample gif/image at readme is broken[give me Not found error]
I am able to set the various parameters inside the java code (amplitude, titles, border size, progress value), but when I try to use setWaveColor or setBorderColor, I get for both of them the following error:
java.lang.IllegalArgumentException: width and height must be > 0
Everithing except these errors works fine and I can see correctly the views. So, at the moment, it's not possible for me to change the color of the View depending on some values in the code.
Thanks
I am building an app with progress,
In countdown timer i am decreasing the wave so how can i decrees the wave smoothly instead of direct decreasing.
is thr any animation control to smoothly setting the progress??
For some items even after calling mWaveLoadingView.pauseAnimation(); animation will play.
is it any way to set max value of progress?for example i need to set it to 2000, but i don`t see any function for it
Hi again
It works fine for me without any bug
Thanks for that.
@tangqi92 Is it possible to add different shapes like rectangle,Triangle,...etc
it will be more compatible and more attractive
this.mProgressValue = progress;
如果不设置的话, getProgressValue() 的值一直是初始的那个 。
java.lang.IllegalArgumentException: bitmap size exceeds 32bits
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:940)
at android.graphics.Bitmap.createBitmap(Bitmap.java:913)
at android.graphics.Bitmap.createBitmap(Bitmap.java:880)
at me.itangqi.waveloadingview.WaveLoadingView.c(ProGuard:394)
at me.itangqi.waveloadingview.WaveLoadingView.onSizeChanged(ProGuard:377)
at android.view.View.sizeChange(View.java:16002)
at android.view.View.setFrame(View.java:15975)
at android.view.View.layout(View.java:15882)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:15886)
at android.view.ViewGroup.layout(ViewGroup.java:4932)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
at android.view.View.layout(View.java:15886)
at android.view.ViewGroup.layout(ViewGroup.java:4932)
at android.support.v4.widget.DrawerLayout.onLayout(ProGuard:1193)
at android.view.View.layout(View.java:15886)
at android.view.ViewGroup.layout(ViewGroup.java:4932)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:15886)
at android.view.ViewGroup.layout(ViewGroup.java:4932)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1692)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1534)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1443)
at android.view.View.layout(View.java:15886)
at android.view.ViewGroup.layout(ViewGroup.java:4932)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:15886)
at android.view.ViewGroup.layout(ViewGroup.java:4932)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1692)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1534)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1443)
at android.view.View.layout(View.java:15886)
at android.view.ViewGroup.layout(ViewGroup.java:4932)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:15886)
at android.view.ViewGroup.layout(ViewGroup.java:4932)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2419)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2132)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1311)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6711)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:813)
at android.view.Choreographer.doCallbacks(Choreographer.java:613)
at android.view.Choreographer.doFrame(Choreographer.java:583)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:799)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5756)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
我想把波长变短一点怎么设置呢?
还有大神,能不能搞个中文版的?我见好多咱们**的开源项目都加了中文wiki
Hello,
Thank you for this awesome library.
Can you please support the minSdkVersion to 11?
This widget is truly beautiful, but i need to lower the frequency of the waves, because there are many things shown on my screen and I need to have a focus somewhere else.
Is there a way to do it easily ? If not, where can I try to do it ?
Thanks for your work :-D
Hi,
how to set progress gradient color.
Hi
I seem to be having the issue with the center title not updating when the wave progress value is set to 100 or has reached a value of 100.
After the wave progress has reached 100 (ie achieved the goal set) I stop calling the setProgressValue() method but still would like the centre title to continue updating if the person exceeds the set goal. But the centre title stops updating once I stop calling the setProgressValue().
I even tried putting this in a if else block where in, if the wave progress is 100 the else block will have value setProgressValue(100) so that there there is a call to this method even with a hard coded value . This also did not help.
The only work around on this is still continue calling the setProgressValue() method with a new value which keeps updating the centre title.
This issue seems to be very cellphone specific. I have an Asus running Marshmallow 6.0.1.
Also on this cellphone the wave is static. What I mean is there is no wave effect inside the widget. I have tried other apps using this widget and it is the same behaviour in other apps also.
Just wondering if you have come across any of these issue earlier and if there are any solutions or workarounds ?
And of course your widget works beautifully on simulators for KitKat Marshmallow and Oreo. I have to still test on others. Great work and thank you for this widget.
Add a function to set background wave's color. Not wlv_wave_background_Color.
能不能由低到高的绘制波浪?
JCenter is being sunset and all publishers are supposed to migrate to new host such as Maven Central
While doing a gradle build following warning is displayed
Please remove usages of
jcenter() Maven repository from your build scripts and migrate your build to other Maven repositories. This repository is deprecated and it will be shut down in the future. See http://developer.android.com/r/tools/jcenter-end-of-service for more information. Currently detected usages in: root project 'XXX', project ':app' Affected Modules: app
Following are the notices for the jCenter being sunset.
JCenter sunset notice
Android Developer Update
Are there any plans of shifting this repo to mavenCentral or any other host?
How change number of waves
i am not able to set max value of wave default it is taking 100 please help me to set max value of progress
Hi this is awesome, i have one query how to set any image view at center of circle,please help me any one ,and how to make glass shape image instead of triangle,its urgent.
Thanks..
个人觉得,水波的速度稍快。
能添加设置水波速度的参数更好。
Hello there, first of all thank you for providing this library, it's very nice. But I have one issue, whenever I try to declare wave color programmatically with setWaveColor(R.color.myColor) I don't get that color, and instead I get some other color. But when I declare in XML file it works...
How to display a line and set the color value
就是每次进入界面的时候,无论设置默认的百分比是多多少,view都会有一个100到指定刻度的动画。谢谢!
Friends was very beautiful loading this I liked it very much congratulations!
Friend I did run without problems in my project however when running a video it does not leave 0% percent loading, how do I correctly count the percentage of loading the correct video?
I made a video showing my problem and the project!
Thank you and hope you can help.
为什么 不是 上下波动 而是 一直 往右边 ??????????赶快 添加
初始化时候如何不要从100%的状态往下走,直接从设置的进度开始
已解决 继承此View在初始化的时候改下setProgressValue方法的调用不要waterLevelAnim.setDuration(1000);
Hi, I'm having this weird problem, please take a look.
I just import the library and try to put it in an empty activity but AS layout editor can't show preview.
Here's the exception
java.lang.IllegalArgumentException: java.lang.ClassCastException@4edc8afc at sun.reflect.GeneratedMethodAccessor2683.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at android.animation.PropertyValuesHolder_Delegate.callMethod(PropertyValuesHolder_Delegate.java:108) at android.animation.PropertyValuesHolder_Delegate.nCallFloatMethod(PropertyValuesHolder_Delegate.java:145) at android.animation.PropertyValuesHolder.nCallFloatMethod(PropertyValuesHolder.java) at android.animation.PropertyValuesHolder.access$400(PropertyValuesHolder.java:38) at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setAnimatedValue(PropertyValuesHolder.java:1359) at android.animation.ObjectAnimator.animateValue(ObjectAnimator.java:989) at android.animation.ValueAnimator.setCurrentFraction(ValueAnimator.java:612) at android.animation.ValueAnimator.setCurrentPlayTime(ValueAnimator.java:578) at android.animation.ValueAnimator.start(ValueAnimator.java:1001) at android.animation.ValueAnimator.start(ValueAnimator.java:1010) at android.animation.ObjectAnimator.start(ObjectAnimator.java:852) at android.animation.AnimatorSet.start(AnimatorSet.java:678) at android.animation.AnimatorSet.onChildAnimatorEnded(AnimatorSet.java:807) at android.animation.AnimatorSet.start(AnimatorSet.java:640) at me.itangqi.waveloadingview.WaveLoadingView.setProgressValue(WaveLoadingView.java:564) at me.itangqi.waveloadingview.WaveLoadingView.init(WaveLoadingView.java:171) at me.itangqi.waveloadingview.WaveLoadingView.<init>(WaveLoadingView.java:137) at me.itangqi.waveloadingview.WaveLoadingView.<init>(WaveLoadingView.java:132) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:465) at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:172) at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105) at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:186) at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:334) at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:345) at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:245) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.inflate(LayoutInflater.java:518) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:324) at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429) at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966) at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533) at com.android.tools.idea.rendering.RenderTask.lambda$inflate$70(RenderTask.java:659) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
Here's my layout xml
`
<me.itangqi.waveloadingview.WaveLoadingView
android:id="@+id/waveLoadingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:wlv_borderColor="@color/colorAccent"
app:wlv_borderWidth="3dp"
app:wlv_progressValue="40"
app:wlv_shapeType="circle"
app:wlv_round_rectangle="true"
app:wlv_triangle_direction="north"
app:wlv_titleCenterStrokeColor="@android:color/holo_blue_dark"
app:wlv_titleCenterStrokeWidth="3dp"
app:wlv_titleCenter="Center Title"
app:wlv_titleCenterColor="@android:color/white"
app:wlv_titleCenterSize="24sp"
app:wlv_waveAmplitude="70"
app:wlv_waveColor="@color/colorAccent"/>
Screenshot
在我达到一定的进度时,我想停掉波浪,让它停下来,应该调用什么方法?
How to change the frequency of the waves ?
如何更改控件中的背景颜色?
您的:app:borderWidth (integer) Default to be 0
编译出错:Error:(2) Attribute "borderWidth" has already been defined
Hi.
When I using rectangle shape type, border color is not working.
I found that if shape is circle or square, border is working but triangle and rectangle is not working.
Can you check it?
Also, is it possible using "\n" on top title or bottom title?
For example, I want to show "AB" on top title like "A (next line) B".
I tried "A\nB", "A\rB", "A\n" and others but not working.
Is this possible?
Thank you for your work.
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.