Android View which can act as iOS9 SiriWave
Clone or download
Latest commit a759975 Dec 27, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea init project Dec 27, 2018
app add README Dec 27, 2018
gradle/wrapper init project Dec 27, 2018
.gitignore init project Dec 27, 2018
README.md add gif Dec 27, 2018
build.gradle init project Dec 27, 2018
gradle.properties init project Dec 27, 2018
gradlew init project Dec 27, 2018
gradlew.bat init project Dec 27, 2018
settings.gradle init project Dec 27, 2018
siri.gif add gif Dec 27, 2018

README.md

AndroidSiriWave

在Android上实现iOS9以上的Siri 波形

1.运行效果

siri

2.使用

2.1 布局

<com.kk.siriwave.SiriWaveView
        android:layout_width="0dp"
        android:layout_height="100dp"
        android:background="@android:color/black"
        android:id="@+id/siri_wave_view"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

背景可以自己设置,我现在用的是黑色。

2.2 代码

siriWaveView.startAnim();
siriWaveView.setVolume(curVolume);

动画过程中可以随时设置音量大小

  • 音量大小的值为:0到100