Implement Google-Play-Music as an animation (spectrum of 3 bars next to the playlist item)

I want to implement something like this. So that I can control my color, number of bars, speed, etc.

Below is the animation that appears next to the item that is currently playing in the Google Play-Music app.

I will reproduce it in a similar way: next to the current game in the music application.

enter image description here

+4
source share
1 answer

There is a library called Mini Equalizer Library for Android that provides this functionality.

1

You need to add a 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"/>

, :

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

, AndroidVuMeter, , , .

2

.

<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"/>
+1

Source: https://habr.com/ru/post/1607271/


All Articles