Giter VIP home page Giter VIP logo

androidwaveview's Introduction

使用方法

1.在项目根目录下的build.gradle中 allprojects repositories 中添加 maven { url 'https://jitpack.io' } 如下: allprojects { repositories { ... maven { url 'https://jitpack.io' } } }

2.在项目中的build.gradle中添加引用 dependencies { compile 'com.github.chr1123:AndroidWaveView:V1.0.2' }

3.在布局文件中使用 <com.chrischen.waveview.WaveView android:id="@+id/waveView" android:layout_width="match_parent" android:layout_height="100dp" android:background="#999"/>

4.代码中使用waveView.putValue(value)为波形图添加采集到的音量值, 使用setHasOver(true)方法设置停止采集后,若采集点的展示超出了宽度,此时可左右滑动展示

添加了相关样式设置 ,可设置波形展示方式,线条宽度颜色间距等 如: <com.chrischen.waveview.WaveView android:id="@+id/waveView" android:layout_width="match_parent" android:layout_height="100dp" android:background="#999" app:wvType="centerLine" app:wvCenterLineColor="#f0f" app:wvCenterLineWidth="1dp" app:wvLineColor="#ff0" app:wvLineWidth="1dp" app:wvLineSpace="5dp"/>

androidwaveview's People

Contributors

chr1123 avatar

Watchers

 avatar

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.