Giter VIP home page Giter VIP logo

waveview's Introduction

icon

WaveView

![Gitter](https://badges.gitter.im/Join Chat.svg) Android Arsenal

A wave view of android,can be used as progress bar.

Screenshot


APK


demo.apk

What can be used as


  • background
  • progress bar

How to use


https://github.com/john990/WaveView/blob/master/app/src/main/res/layout/main.xml#L7-L17

    <com.john.waveview.WaveView
        android:id="@+id/wave_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#ff702e8c"
        wave:above_wave_color="@android:color/white"
        wave:blow_wave_color="@android:color/white"
        wave:progress="80"
        wave:wave_height="little"
        wave:wave_hz="normal"
        wave:wave_length="middle" />

or you can just use(default progress is 80%)

    <com.john.waveview.WaveView
        android:id="@+id/wave_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/holo_purple"
        />

dependencies

allprojects {
		repositories {
			...
			maven { url "https://jitpack.io" }
		}
	}
	
	dependencies {
	        compile 'com.github.john990:WaveView:v0.9'
	}

waveview's People

Contributors

ez0ne avatar gitter-badger avatar harlonwang avatar john990 avatar liufuxin 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

waveview's Issues

Smooth leveling on setting level

Between setting new levels, the wave level changes immediately. However I want the level to rise and fall gradually. How can I achieve that?

Update project

Hello there,

I forked your great project to make it easier to implement with gradle.
You can check it out from here

Thanks again for perfect library.
Good luck.

Problem with save state on the wave view

Hello,

I implemented a wave view in fragment with 30 % loaded.
I implemented the fragment in the viewpager.

When i switch few pages ("fragments") and I'm back. But the 30 % of the wave_view drew 100 %.

I try to update the view all time and set 30 % the progress. But, this didn't work.

for circular progressbar animation

how can i use wave view animation for circular progress bar ? i just want to show animatiion inside circular progressbar ? can i use same ?

wave view change color as it progresses

I want my waveview to change color as it increases and since it only accepts color in xml I can't use a drawable with a gradient. Any way to work around it

gap time in wave.java

Checking the code, found out this:
long gap = 16 - System.currentTimeMillis() - start;
File: Wave.java -- Class: RefreshProgressRunnable
i am always getting negative values...why not make it:
long gap = 16 - (System.currentTimeMillis() - start);
so it gets a positive number always and we can delete gap < 0 ? 0 : gap check?

多行波浪无法设置问题

您好,WaveView代码中获取自定义View属性时有获取设置多行波浪的代码,默认为1;
但是 在XML中不存在 设置多行波浪的 那个属性

Wave not show wave effect on first time when attached in Fragment

When Fragment was created I injected some logic to overall view that not include waveview,
I wonder why wave is not working, but when I drag notification bar down and push it up and look up WaveView in app. The wave was worked right.

What was something that I had wrong.

PS. I try to use
waveView.invalidate();
waveView.postInvalidate();
waveView.postInvalidate(5000);
It seems not working.

Gradient fill?

Is there a scope of the library being updated to support gradient fills?
In order to support a subtle effect like the following (I am referring to the background alone, ignore the dark objects on each image)
image
It's a part of an app I am working on that has millions of downloads, and would thus impact a huge audience.

High CPU usage ?

After a long time, the phone gets hot and the monitor in AS tells the cpu usage is around 30%(for only one view, about 60% for two view) ?
Anyone met the problem?

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.