Giter Site home page Giter Site logo

waveloadingview's People

Contributors

ardacebi avatar awakens avatar greatgarlic avatar hipoom avatar judemanutd avatar shayanzoro avatar stiekel avatar tangqi92 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waveloadingview's Issues

How to change the width and height of the waves?

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. ^_^

添加浮动动画

您好请问一下我想在波浪上方添加一个图片随着波浪上下浮动,请问有什么思路吗?

setAnimDuration Not working

setAnimDuration doesn't change the animation duration as there is a hardcoded duration of 1000 set inside setProgressValue. Please update.

NestedScroll

Hi,

I cant use WaveLoadingView with NestedScroll.

please help me

Class WaveLoadingView could not be instantiated

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)

Stop or freeze wave

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

Errors with setWaveColor and setBorderColor

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

Progress setting to wave smooth animation

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??

max value

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

Shape types

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

java.lang.IllegalArgumentException: bitmap size exceeds 32bits

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

How to change the frequency of the waves ?

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

Is centerTitle update linked to setting the wave progress value

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.

Will this repository be migrated to maven central ?

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?

for image view

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..

关于4.0模拟器显示问题

运行在AS 4.0模拟器上,有个显示问题。
见下图:↓
4 0

progressValue 设置的是5,上方区域被填充了(应该为透明)

Set wave color

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...

Please help!

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!

https://youtu.be/FQF78tbo24M

Thank you and hope you can help.

初始化时候如何不要从100%的状态往下走

初始化时候如何不要从100%的状态往下走,直接从设置的进度开始
已解决 继承此View在初始化的时候改下setProgressValue方法的调用不要waterLevelAnim.setDuration(1000);

Could not instantiate view in layout editor

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

image

如何停掉波浪

在我达到一定的进度时,我想停掉波浪,让它停下来,应该调用什么方法?

border color is not working when shape type is rectangle.

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.

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.