Created
April 8, 2015 12:39
-
-
Save SpiritOfDarkDragon/e93bfb823288c4422f4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//activity.xml | |
<SeekBar | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:id="@+id/sb_progress" | |
android:progressDrawable="@drawable/custom_seek_bar" | |
android:paddingLeft="0dp" | |
android:paddingRight="0dp" | |
android:minHeight="8dip"//important! | |
android:maxHeight="8dip"//important! | |
/> | |
//custom_seek_bar.xml | |
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<item | |
android:id="@android:id/background" | |
android:drawable="@drawable/custom_seek_bar_bg"/> | |
<item android:id="@android:id/secondaryProgress"> | |
<clip> | |
<shape> | |
<solid | |
android:color="#afadc3" /> | |
<padding | |
android:left="0dp" | |
android:top="0dp" | |
android:right="0dp" | |
android:bottom="0dp" /> | |
</shape> | |
</clip> | |
</item> | |
<item android:id="@android:id/progress"> | |
<clip> | |
<shape> | |
<solid | |
android:color="#646d8a" /> | |
<padding | |
android:left="0dp" | |
android:top="0dp" | |
android:right="0dp" | |
android:bottom="0dp" /> | |
</shape> | |
</clip> | |
</item> | |
</layer-list> | |
//custom_seek_bar_bg.xml | |
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" > | |
<solid | |
android:color="#dcdcdc"/> | |
<padding | |
android:left="0dp" | |
android:top="0dp" | |
android:right="0dp" | |
android:bottom="0dp" /> | |
</shape> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment