|
1 | | -# mini-equalizer-library-android |
| 1 | +Mini Equalizer Library for Android |
| 2 | +================================== |
| 3 | + |
| 4 | +This Android Library project is created to let you use a animated equalizer inside your music related apps. |
| 5 | + |
| 6 | + |
| 7 | +**Supported Android versions**: Android 4.0+ |
| 8 | + |
| 9 | +How to use it |
| 10 | +---------------------- |
| 11 | + |
| 12 | +Add this to your dependencies: |
| 13 | + |
| 14 | +```groovy |
| 15 | +compile 'com.github.claucookie.miniequalizer:library:1.0.0' |
| 16 | +``` |
| 17 | + |
| 18 | +## Layout |
| 19 | + |
| 20 | +````xml |
| 21 | + <es.claucookie.miniequalizerlibrary.EqualizerView |
| 22 | + xmlns:custom="http://schemas.android.com/apk/res-auto" |
| 23 | + android:id="@+id/equalizer_view" |
| 24 | + android:layout_width="30dp" |
| 25 | + android:layout_height="30dp" |
| 26 | + custom:foregroundColor="@color/link_text_material_light" |
| 27 | + custom:animDuration="3500"/> |
| 28 | +```` |
| 29 | + |
| 30 | +### Attributes |
| 31 | + |
| 32 | +There is some custom attributes you can adjust from the xml: |
| 33 | + - foregroundColor : the equalizer bars color (default is black) |
| 34 | + - animDuration : (millisecs) the animation follows a pattern and the number of loops is infinite. To set the duration of each loop, use this attribute. |
| 35 | + |
| 36 | +## Activity |
| 37 | + |
| 38 | +### Initialization + animating |
| 39 | + |
| 40 | +To start animating the equalizer you should add: |
| 41 | + |
| 42 | +````java |
| 43 | +EqualizerView equalizer = (EqualizerView) findViewById(R.id.equalizer_view); |
| 44 | +equalizer.animateBars(); // Whenever you want to tart the animation |
| 45 | +equalizer.stopBars(); // When you want equalizer stops animating |
| 46 | +```` |
| 47 | +And... that's it!, so simple. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +Contribution |
| 53 | +------------ |
| 54 | +Every idea, fork and suggestion is very welcome. |
| 55 | + |
| 56 | +Author |
| 57 | +-------- |
| 58 | +Claudia Luque Fernández @claucookie |
| 59 | + |
| 60 | +License |
| 61 | +------- |
| 62 | +http://opensource.org/licenses/MIT |
| 63 | + |
0 commit comments