I want to implement something like this. So that I can have control over its color, number of bars, speed, etc.
Below is the animation that is shown next to the item that is currently playing in the Google-Play-Music app.
I will play this in a similar manner: next to the currently playing song in a music app.
There is a library called Mini Equalizer Library for Android which provides this functionality.
You need to add the view to your layout:
<es.claucookie.miniequalizerlibrary.EqualizerView
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:id="@+id/equalizer_view"
android:layout_width="30dp"
android:layout_height="30dp"
custom:foregroundColor="@color/link_text_material_light"
custom:animDuration="3500"/>
In order to start the animation, use this code:
EqualizerView equalizer = (EqualizerView) findViewById(R.id.equalizer_view);
equalizer.animateBars(); // Whenever you want to tart the animation
equalizer.stopBars(); // When you want equalizer stops animating
Also, there is another library called AndroidVuMeter which seems to have more options.
Just add the view to your layout.
<io.gresse.hugo.vumeterlibrary.VuMeterView
android:layout_width="300dp"
android:layout_height="300dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingBottom="40dp"
android:id="@+id/vumeter"
vumeter:stopSize="5dp"
vumeter:speed="10"
vumeter:blockNumber="5"
vumeter:blockSpacing="20dp"
vumeter:backgroundColor="#33b5e5"
vumeter:startOff="false"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With