Skip to content

Instantly share code, notes, and snippets.

@kheldiente
Last active May 27, 2018 04:40
Show Gist options
  • Save kheldiente/777c10723b8e64c6624efc3b2e81f81f to your computer and use it in GitHub Desktop.
Save kheldiente/777c10723b8e64c6624efc3b2e81f81f to your computer and use it in GitHub Desktop.
Use Equalizer view in xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:orientation="vertical"
tools:context="midien.kheldiente.equalizer.MainActivity"
>
<android.support.v7.widget.Toolbar
android:id="@+id/tb_app"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:theme="@style/AppToolbar.Theme">
<android.support.v7.widget.AppCompatTextView
style="@style/AppTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAllCaps="true"
android:layout_gravity="center"
/>
</android.support.v7.widget.Toolbar>
<midien.kheldiente.equalizer.view.EqualizerView
android:id="@+id/view_eq"
android:layout_width="match_parent"
android:layout_height="300dp"
android:background="@android:color/black"
app:progressDrawable="@drawable/seekbar_style"
app:thumb="@drawable/seekbar_thumb"
/>
... Other views
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment