waveview for android

Related tags

Layout WaveView
Overview

中文介绍

WaveView

A view to display wave effect.

Screenshot

Screenshot

Integration

implementation 'com.gelitenight.waveview:waveview:1.0.0'

Setter methods:

  • setWaveShiftRatio - Shift the wave horizontally.
  • setWaterLevelRatio - Set water level.
  • setAmplitudeRatio - Set vertical size of wave.
  • setWaveLengthRatio - Set horizontal size of wave.

You can use Property Animation to animate WaveView.

// horizontal animation.
// wave waves infinitely.
ObjectAnimator waveShiftAnim = ObjectAnimator.ofFloat(
        mWaveView, "waveShiftRatio", 0f, 1f);
waveShiftAnim.setRepeatCount(ValueAnimator.INFINITE);
waveShiftAnim.setDuration(1000);
waveShiftAnim.setInterpolator(new LinearInterpolator());

// vertical animation.
// water level increases from 0 to center of WaveView
ObjectAnimator waterLevelAnim = ObjectAnimator.ofFloat(
        mWaveView, "waterLevelRatio", 0f, 0.5f);
waterLevelAnim.setDuration(10000);
waterLevelAnim.setInterpolator(new DecelerateInterpolator());
animators.add(waterLevelAnim);

// amplitude animation.
// wave grows big then grows small, repeatedly
ObjectAnimator amplitudeAnim = ObjectAnimator.ofFloat(
        mWaveView, "amplitudeRatio", 0f, 0.05f);
amplitudeAnim.setRepeatCount(ValueAnimator.INFINITE);
amplitudeAnim.setRepeatMode(ValueAnimator.REVERSE);
amplitudeAnim.setDuration(5000);
amplitudeAnim.setInterpolator(new LinearInterpolator());
animators.add(amplitudeAnim);

打个广告

美团平台及酒旅事业群招人啦,欢迎加入我们! 我可以帮忙内推,简历请发到我邮箱[email protected]

【美团网】高级Android开发工程师 工作内容: 负责美团酒店、旅游产品 Android 客户端的设计、开发与改进。

  1. 3年以上工作经验,2年以上Android开发经验;
  2. 熟悉Android系统,熟悉Android软件的开发、测试、分发流程;
  3. 良好的编程风格,扎实的编程基础和数据结构算法基础;
  4. 熟悉移动网络的特性,对网络编程和常用网络协议有较深刻理解和经验;
  5. 有一定的架构设计能力,良好的编码能力,编写文档能力;
  6. 热爱互联网和新技术,具有极强的快速学习能力;
  7. 有以下特征优先考虑:
    • 有开源作品或技术博客(需原创技术文章);
    • 熟悉Socket编程。

北京、上海、厦门、成都都有职位,更多职位请见职位列表

Comments
  • Why can't I set WaveView opaque?

    Why can't I set WaveView opaque?

    I want to set WaveView opaque. I have set up the Alpha of wavePaint1 to 255. But no matter what i do, View is still transparent. Do you have some good method?

    Like this(the red view should be opaque). image

    opened by nantofu 3
  • 选择颜色,然后旋转屏幕会crash

    选择颜色,然后旋转屏幕会crash

    复现:随便选择一个颜色(除默认的灰色),旋转屏幕

    原因分析:修改颜色后旋屏会调用 setWaveColor(),此时heightwidth都为 0 不知道为什么会调用 setWaveColor()

    暂时解决: 在 createShader() 中添加如下代码

    if (getHeight() == 0) {
                return;
    }
    
    duplicate 
    opened by meijieman 1
  • A Gap in the Wave

    A Gap in the Wave

    In my simulator(1080*1920,API 19),there is a white vertical line in the wave, and I have find the solution:In WaveView.java -> createShader ,change from final float endX = getWidth(); to final float endX = getWidth()+1;

    opened by hzqjyyx 0
  • Updated CompiledSdkVersion from 25 to 28

    Updated CompiledSdkVersion from 25 to 28

    From new Android guidelines, all app must be above API level 26. So I updated CompileSdkVersion to 28 Update the gardle version to 4.10.1 Replaced the compile attribute in gradle file with implementation tag I have also run the entire updated app on Emulator, and it is working fine

    opened by sanjeevyadavIT 0
  • Support for latest API level

    Support for latest API level

    Hello,

    We are currently using your library in one of our applications. Actually we need a favour from your side. According to the Google Play Policy, all apps have to provide support for at least API level 26. It seems like yours is not as per the new Google Play Policy. We are targeting API level 28. So can you please provide us support for API level 28 in your current repository?

    opened by ebghrimtech 2
  • Making the WaveView fill the remaining space after rotation is not working

    Making the WaveView fill the remaining space after rotation is not working

    I am trying to use the library in conjunction with the gyroscope values so that when I rotate the phone, I get the water flowing effect.

    The only problem is, when the WaveView rotates, it doesn't expand it's height and width to fill the blank area that's generated in the sides. This happens even if I have given match_parent as the width.

    Is there a way to get this working? Or am I getting something wrong?

    I have put a stackoverflow question too, with images, here : https://stackoverflow.com/q/48369005/7947474

    opened by BasitTramboo 0
  • How to change water level?

    How to change water level?

    Water level always set to 50% of view. How i can set any other level to using it like a progress bar?

    Method setWaterLevelRatio dont do anything.

    Thanks in advance!

    opened by stovberpv 2
Owner
NIGHT
NIGHT
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube New graphic component.

Please switch to DragView, for the best support, thank you DraggablePanel Download allprojects { repositories { ... maven { url 'https://jitp

Hoàng Anh Tuấn 103 Oct 12, 2022
FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

null 33 Dec 8, 2022
A wave view of android,can be used as progress bar.

WaveView ![Gitter](https://badges.gitter.im/Join Chat.svg) A wave view of android,can be used as progress bar. Screenshot APK demo.apk What can be use

Kai Wang 1.3k Dec 28, 2022
An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu

ResideLayout An Android Layout which has a same function like https://github.com/romaonthego/RESideMenu. Can be used on Android 1.6(I haven't try it.)

Yang Hui 392 Oct 12, 2022
An Android library that help you to build app with swipe back gesture.

SwipeBackLayout An Android library that help you to build app with swipe back gesture. Demo Apk GooglePlay Requirement The latest android-support-v4.j

ike_w0ng 6.1k Dec 29, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Nov 21, 2022
Ultra Pull to Refresh for Android. Support all the views.

Welcome to follow me on GitHub or Twitter GitHub: https://github.com/liaohuqiu Twitter: https://twitter.com/liaohuqiu 中文版文档 Wanna auto-load-more? This

Huqiu Liao 9.6k Jan 5, 2023
SwipeBack is an android library that can finish a activity by using gesture.

SwipeBack SwipeBack is a android library that can finish a activity by using gesture. You can set the swipe direction,such as left,top,right and botto

Eric 1.7k Nov 21, 2022
A very simple arc layout library for Android

ArcLayout A very simple arc layout library for Android. Try out the sample application on the Play Store. Usage (For a working implementation of this

ogaclejapan 1.4k Dec 26, 2022
Android layout that simulates physics using JBox2D

PhysicsLayout Android layout that simulates physics using JBox2D. Simply add views, enable physics, and watch them fall! See it in action with the sam

John Carlson 689 Dec 29, 2022
Android component which presents a dismissible view from the bottom of the screen

BottomSheet BottomSheet is an Android component which presents a dismissible view from the bottom of the screen. BottomSheet can be a useful replaceme

Flipboard 4.5k Dec 28, 2022
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Umano: News Read To You 9.4k Dec 31, 2022
Allows the easy creation of animated transition effects when the state of Android UI has changed

android-transition Android-Transition allows the easy creation of view transitions that reacts to user inputs. The library is designed to be general e

Kai 615 Nov 14, 2022
Stale Android Toasts made tasty.

FrenchToast Stale Android Toasts made tasty. Android Toasts are amazing, but they have a few major drawbacks: You cannot control when they show up as

py - Pierre Yves Ricau 367 Nov 15, 2022
An Android demo of a foldable layout implementation. Engineered by Vincent Brison.

Foldable Layout This code is a showcase of a foldable animation I created for Worldline. The code is fully written with java APIs from the Android SDK

Worldline 599 Dec 23, 2022
Flexbox for Android

FlexboxLayout FlexboxLayout is a library project which brings the similar capabilities of CSS Flexible Box Layout Module to Android. Installation Add

Google 17.7k Jan 2, 2023
A floating menu library for Android.

Hover Hover is a floating menu implementation for Android. Goals The goals of Hover are to: Provide an easy-to-use, out-of-the-box floating menu imple

Google 2.7k Dec 27, 2022
Simple android library to present an animated ferris wheel

Ferris Wheel View Overview An Android Library used to implement an animated Ferris Wheel in android. API SDK 15+ Written in Kotlin Supports landscape

Igor Lashkov 318 Dec 7, 2022